Closed GoogleCodeExporter closed 8 years ago
This is not Q or Haskell. Use (0..6) instead of [0..6] and everything should be
fine. Note that .. is just an ordinary infix operator in Pure, so the syntax
for arithmetic progressions works a bit differently from Haskell, see
http://docs.pure-lang.googlecode.com/hg/pure.html#primary-expressions and
http://docs.pure-lang.googlecode.com/hg/purelib.html#..
Original comment by aggraef@gmail.com
on 13 Feb 2012 at 10:33
Sorry, GC messed up the second link, here's the right one:
http://docs.pure-lang.googlecode.com/hg/purelib.html#...
Original comment by aggraef@gmail.com
on 13 Feb 2012 at 10:35
And, just for the record, here's how you'd write that little example in Pure:
let ShortWeekdays = ["so", "mo", "di", "mi", "do", "fr", "sa" ];
let days = record (zipwith (=>) ShortWeekdays (0..6));
days!"so"; // yields 0
Original comment by aggraef@gmail.com
on 13 Feb 2012 at 10:38
Original issue reported on code.google.com by
loo6...@gmail.com
on 13 Feb 2012 at 9:56