This file contains 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 characters
(ns fj | |
(:import [java.util.concurrent RecursiveTask | |
ForkJoinPool])) | |
(set! *warn-on-reflection* true) | |
;; ----------------------------------------------- | |
;; Helpers to provide an idiomatic interface to FJ | |
(defprotocol IFJTask |
This file contains 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 characters
# A list is either () or (head, list). | |
# list = () | (head, list) | |
def make_list(xs): return (xs[0], make_list(xs[1:])) if xs else () | |
L = make_list('abcd') | |
## L | |
#. ('a', ('b', ('c', ('d', ())))) | |