From addac10a47693a976808bf75fe63aed19f8dbb63 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 22 Jul 2018 15:01:05 -0700 Subject: Re-autoformatted everything. The main changes are: no longer adding a newline after 1-line indented code inside blocks, and forcing files to have a trailing newline. The trailing newline thing created a lot of spurious changes. --- core/collections.nom | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'core/collections.nom') 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 -- cgit v1.2.3