Skip to content

Commit 4614385

Browse files
Merge pull request #775 from DrCBeatz/patch-1
Add list comprehension example to haskell/2010/control_structures.json
2 parents 2b223c4 + 5c721f7 commit 4614385

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

web/thesauruses/haskell/2010/control_structures.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@
6262
"not-implemented": true,
6363
"name": "Each iteration"
6464
},
65+
"list_comprehension": {
66+
"comment": "Second line adds a guard, which plays the same role as Python’s `if` filter.",
67+
"code": "newList = [foo item | item <- iterable]\nnewList = [foo item | item <- iterable, conditional item]",
68+
"name": "List Comprehension"
69+
},
6570
"map_iteration": {
6671
"code": "map function list",
6772
"name": "Map iteration"

0 commit comments

Comments
 (0)