From b95d7b2ff99ed407766dd37253d5d728b41b64e0 Mon Sep 17 00:00:00 2001 From: Jim Pryor Date: Sat, 4 Dec 2010 09:33:39 -0500 Subject: [PATCH] translating tweaks Signed-off-by: Jim Pryor --- translating_between_OCaml_Scheme_and_Haskell.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translating_between_OCaml_Scheme_and_Haskell.mdwn b/translating_between_OCaml_Scheme_and_Haskell.mdwn index 20e10b50..77db4432 100644 --- a/translating_between_OCaml_Scheme_and_Haskell.mdwn +++ b/translating_between_OCaml_Scheme_and_Haskell.mdwn @@ -289,7 +289,7 @@ So we have: In OCaml, there is no predefined `null` or `isempty` function. One can still test whether a list is empty using the comparison `lst = []`. -* In Haskell, the expression [1..5] is the same as [1,2,3,4,5], and the expression [0..] is a infinite lazily-evaluated stream of the natural numbers. In OCaml, there is no [1..5] shortcut, lists must be finite, and they are eagerly evaluated. It is possible to create lazy streams in OCaml, even infinite ones, but you have to use other techniques than the native list type. +* In Haskell, the expression `[1..5]` is the same as `[1,2,3,4,5]`, and the expression `[0..]` is a infinite lazily-evaluated stream of the natural numbers. In OCaml, there is no `[1..5]` shortcut, lists must be finite, and they are eagerly evaluated. It is possible to create lazy streams in OCaml, even infinite ones, but you have to use other techniques than the native list type. * Haskell has *list comprehensions*: -- 2.11.0