Skip to content

Commit 58523e6

Browse files
bernhard-herzoghdgarrood
authored andcommitted
Note difference in behavior of range operator (..) (#247)
In particular note that the behavior of (a..b) differs from [a..b] when b is smaller than a.
1 parent 13725a0 commit 58523e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

language/Differences-from-Haskell.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,4 +311,4 @@ As PureScript has not inherited Haskell's legacy code, some operators and functi
311311
- Many functions that are part of `Data.List` in Haskell are provided in a more generic form in `Data.Foldable` or `Data.Traversable`.
312312
- `some` and `many` are defined with the type of list they operate on (`Data.Array` or `Data.List`).
313313
- Instead of `_foo` for typed holes, use `?foo`. You have to name the hole; `?` is not allowed.
314-
- Ranges are written as `1..2` rather than `[1..2]`
314+
- Ranges are written as `1..2` rather than `[1..2]`. There's a difference, though: in Haskell `[2..1]` is an empty list, whereas in PureScript `2..1` is `[2,1]`

0 commit comments

Comments
 (0)