diff options
Diffstat (limited to 'core/collections.nom')
| -rw-r--r-- | core/collections.nom | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/core/collections.nom b/core/collections.nom index f74b24d..6f2d4c8 100644 --- a/core/collections.nom +++ b/core/collections.nom @@ -29,7 +29,6 @@ test: action [%item is in %list, %list contains %item, %list has %item]: for %key = %value in %list: if (%key is %item): return (yes) - return (no) test: @@ -41,7 +40,6 @@ action [..] ..: for %key = %value in %list: if (%key is %item): return (no) - return (yes) test: @@ -94,7 +92,6 @@ parse [%expression for %item in %iterable] as (..) %comprehension = [] for %item in %iterable: add %expression to %comprehension - return %comprehension parse [..] @@ -105,7 +102,6 @@ parse [..] %comprehension = [] for %index in %start to %stop via %step: add %expression to %comprehension - return %comprehension ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -127,10 +123,8 @@ parse [..] %comprehension = [] for %key = %value in %iterable: add %expression to %comprehension - return %comprehension - # Dict comprehensions test: assume (((% * %) = % for % in [1, 2, 3]) == {1:1, 4:2, 9:3}) @@ -141,7 +135,6 @@ parse [%key = %value for %item in %iterable, %key %value for %item in %iterable] %comprehension = {} for %item in %iterable: %comprehension.%key = %value - return %comprehension test: @@ -155,7 +148,6 @@ parse [..] %comprehension = {} for %src_key = %src_value in %iterable: %comprehension.%key = %value - return %comprehension parse [..] @@ -166,7 +158,6 @@ parse [..] %comprehension = {} for %item in %start to %stop via %step: %comprehension.%key = %value - return %comprehension ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -186,7 +177,6 @@ action [%lists flattened]: %flat = [] for %list in %lists: for %item in %list: add %item to %flat - return %flat test: @@ -222,7 +212,6 @@ compile [%dict with fallback %key -> %value] to (..) return value end}) - # Sorting test: %x = [3, 1, 2] @@ -267,4 +256,4 @@ action [unique %items]: add % to %unique %seen.% = (yes) - return %unique
\ No newline at end of file + return %unique |
