mirror of
https://github.com/janet-lang/janet
synced 2024-12-25 07:50:27 +00:00
Replicate segmentation fault
This commit is contained in:
parent
da15dac16b
commit
68bf4d460b
@ -141,5 +141,11 @@ body once, and then memoizes the result."
|
||||
(defn filter2 [pred coll]
|
||||
(tail (iter2lazy (filter pred coll))))
|
||||
|
||||
(def arr [0 -1 -2 33 -3 0 302 -3 2 8 54 3 -2 0])
|
||||
|
||||
(def filtered (filter2 pos? arr))
|
||||
|
||||
(defn run-me [] (realize filtered))
|
||||
|
||||
#be carfull with the filter function. First element in (filter pos? arr) is nil
|
||||
#last element is false
|
||||
|
Loading…
Reference in New Issue
Block a user