added vscode extensions
This commit is contained in:
parent
7cde0829be
commit
26e2a50441
316 changed files with 37301 additions and 0 deletions
13
.vscode/extensions/eckertalex.borealis-1.0.2/demo/purescript.purs
vendored
Normal file
13
.vscode/extensions/eckertalex.borealis-1.0.2/demo/purescript.purs
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
module Euler.Problem2 where
|
||||
|
||||
import Prelude
|
||||
import Control.Lazy (defer)
|
||||
import Data.Foldable (sum)
|
||||
import Data.Int (even)
|
||||
import Data.List.Lazy (List, filter, takeWhile, (:))
|
||||
|
||||
lazyFibList :: Int -> Int -> List Int
|
||||
lazyFibList f1 f2 = f1 : defer \_ -> lazyFibList f2 (f1 + f2)
|
||||
|
||||
solution :: Int
|
||||
solution = sum $ filter even $ takeWhile (_ < 4_000_000) $ lazyFibList 1 2
|
||||
Loading…
Add table
Add a link
Reference in a new issue