Last active
March 20, 2023 22:21
-
-
Save raspasov/c25c9b635fa9ef7c8743cb115dae45dd to your computer and use it in GitHub Desktop.
Revisions
-
raspasov revised this gist
Mar 20, 2023 . 1 changed file with 8 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,16 @@ (transduce (comp (map-indexed (fn [idx item] [idx item])) (map (fn [[idx item]] (println "sending to space" idx) [idx item]))) (fn ;;completing arity ([accum] accum) ;;reduce arity ([accum [idx item]] (if (< 100 idx) (reduced accum) accum))) [] (range)) -
raspasov revised this gist
Mar 20, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ (fn ;;completing arity ([accum] accum) ;;reduce arity ([accum [idx item]] (if (< 100 idx) ;; stop at 100 (reduced accum) ;; stop -
raspasov created this gist
Mar 20, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ (transduce (map-indexed (fn [idx item] [idx item])) (fn ;;completing arity ([accum] accum) ;;reduce arit ([accum [idx item]] (if (< 100 idx) ;; stop at 100 (reduced accum) ;; stop (conj accum item)))) ;; else, continue [] (range))