Skip to content

Instantly share code, notes, and snippets.

@greymd
Created September 23, 2017 14:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save greymd/2ba67e6c4c3f09eecdc57a31599fc461 to your computer and use it in GitHub Desktop.
Save greymd/2ba67e6c4c3f09eecdc57a31599fc461 to your computer and use it in GitHub Desktop.
Convert Collection to Array in Egison
(define $collection2array
1#(generate-array (nth $ %1) [1 (length %1)]))
; > (collection2array {a b c})
; (|a b c|)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment