Easy as { 1 2 3 }? (when { 1 2 3 } ≠ { 1 2 3 })
|
07-15-2018, 02:38 PM
Post: #7
|
|||
|
|||
RE: Easy as { 1 2 3 }?
Here's a fairly succinct 50g program that uses DOLIST and STREAM to compare elements (and has special cases to handle empty or single-element lists).
Code:
You could change the "\<< == \>>" DOLIST argument to do type checking and recursion if you want it to work on nested lists. Corrections/improvements welcome, as always. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)