Browse thread
List comprehensions
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Adrien <camaradetux@g...> |
| Subject: | Re: [Caml-list] List comprehensions |
I just tried this to avoid a big block of ugly code but it doesn't work with
3.09:
# [x + 2*x + x/2 | x <- [1; 2; 3; 4]];;
Characters 15-16:
[x + 2*x + x/2 | x <- [1; 2; 3; 4]];;
^
Syntax error
So it's a very recent addition, no surprise you didn't know had this. ;)
---
Adrien Nader