diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-06-14 21:59:25 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-06-14 21:59:43 -0700 |
| commit | 82cfd3e54b5910843c091a9fb6ef3ad6b64ba757 (patch) | |
| tree | aed04a3910646c82447b9b4b515169005b3010af /core/collections.nom | |
| parent | 282565a309aef632502a64fef0a67b0b7efcfaaa (diff) | |
More streamlining and cleanup. Especially for core/metaprogramming.nom
Diffstat (limited to 'core/collections.nom')
| -rw-r--r-- | core/collections.nom | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/collections.nom b/core/collections.nom index a8a28b2..8a59852 100644 --- a/core/collections.nom +++ b/core/collections.nom @@ -16,8 +16,8 @@ immediately ..to: Lua value "utils.nth_to_last(\(%list as lua expr), \(%index as lua expr))" immediately - parse [first in %list, first %list] as: 1 st in %list - parse [last in %list, last %list] as: 1 st to last in %list + parse [last in %list] as: 1st to last in %list + parse [first in %list] as: %list.1 # Membership testing immediately @@ -62,8 +62,8 @@ immediately parse [%expression for %item in %iterable] as result of %comprehension <- [] - for %i = %item in %iterable - %comprehension.%i <- %expression + for %item in %iterable + add %expression to %comprehension return %comprehension parse [..] @@ -163,8 +163,8 @@ immediately %unique <- [] %seen <- {} for % in %items - unless: % in %seen + unless: %seen.% add % to %unique - (% in %seen) <- (yes) + %seen.% <- (yes) return %unique |
