4import Control.Monad.Eff
5import Control.Monad.Eff.Console (log)
8data List a = Cons a (List a) | Nil
10match2 :: List Number -> Number
11match2 (Cons x (Cons y xs)) = x * y + match2 xs
15 let result = match2 (Cons 1.0 (Cons 2.0 (Cons 3.0 (Cons 4.0 (Cons 5.0 (Cons 6.0 (Cons 7.0 (Cons 8.0 (Cons 9.0 Nil)))))))))
16 assert' "Incorrect result!" (result == 100.0)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list