1
0
mirror of https://github.com/janet-lang/janet synced 2025-12-12 03:28:07 +00:00

Add functionality that allows the set macro to

take a tuple as an l-value. Remove the old
multi-sym report in anticipation of a different
mechanism.
This commit is contained in:
Calvin Rose
2019-01-06 19:33:27 -05:00
parent 92e9e64945
commit eae4e0dede
11 changed files with 138 additions and 207 deletions

View File

@@ -5,10 +5,10 @@
(def solutions @{})
(def len (length s))
(for k 0 len
(put tab s.k k))
(put tab (s k) k))
(for i 0 len
(for j 0 len
(def k (get tab (- 0 s.i s.j)))
(def k (get tab (- 0 (s i) (s j))))
(when (and k (not= k i) (not= k j) (not= i j))
(put solutions {i true j true k true} true))))
(map keys (keys solutions)))