Lisp | Haskell
------------------|------------------
map f l | map f l
map list l1 l2 | zip l1 l2
map list l1 l2 l3 | zip3 l1 l2 l3
map f l1 l2 | zipWith f l1 l2
map f l1 l2 l3 | zipWith3 f l1 l2 l3
Lisp | Haskell
--------------------------------------|-----------------------------------------
(EVAL (SETQ X '`(EVAL (SETQ X ',X)))) | <interactive>:1:0: Not in scope: `eval'
Lisp | Haskell
------------------------|-------------------------------------------------------
* (type-of 123) | <interactive>:1:0: Not in scope: `typeof'
(INTEGER 0 536870911) |
Lisp | Haskell
--------------------------|-----------------------------------------------------
(map #'map (read) (read)) | Couldn't match expected type `[t1] -> t'
| against inferred type `[[a] -> [b]]'
Lisp | Haskell
---------------------------|----------------------------------------------------
Prefix notation. | Prelude> let fac 1 = 1; fac n = n * fac n-1
| Prelude> fac 4
| *** Exception: stack overflow
|
| Prelude> let f 1 = 1; f n = ((*)(n)((f) ((-) n 1)))
| Prelude> ((f) 4)
| 24
Lisp | Haskell
-------------------------|------------------------------------------------------
* (setf Tree | data Tree a = Empty | Node (Tree a) a (Tree a)
'((n 5 (n 5 n)) | tree = Node
4 | (Node Empty 5 (Node Empty 5 Empty))
((n 5 n) 6 n))) | 4
| (Node (Node Empty 5 Empty) 6 Empty)
Lisp | Haskell
---------------------------|---------------------------------------------------
Speed comparable to C/C++ | The fastest BWT implementation written in Haskell,
| after weeks of optimization by several experts,
| remained over 200x slower than C++.
Lisp | Haskell
--------------------------|-----------------------------------------------------
* (defun yoba (a b) | Prelude> :{
(if (< a b) | Prelude| let yoba a b = if a < b
'(123 "abc") | Prelude| then [123, "abc"]
'("abc" 123))) | Prelude| else ["abc", 123]
* (* 2 (car (yoba 1 2))) | Prelude> :}
245 | <interactive>:1:30:
* | No instance for (Num [Char])
| arising from ...
Name:
Anonymous2011-12-28 2:05
>>50 crap :: (crap -> crap) -> crap
looks like crap.
is that because it aint Lisp?