2017-06-26 12:15:03 +03:00
|
|
|
(defmodule Array
|
|
|
|
|
2017-10-12 21:13:53 +03:00
|
|
|
(defn sum [xs]
|
|
|
|
123456)
|
|
|
|
|
|
|
|
)
|
2017-10-12 22:27:36 +03:00
|
|
|
|
|
|
|
;; Defined internally in the compiler
|
|
|
|
;; -----------------------------------------------
|
|
|
|
;; aset : (λ [(Array t) Int t] (Array t))
|
|
|
|
;; aset! : (λ [(Ref (Array t)) Int t] ())
|
|
|
|
;; copy : (λ [(Ref (Array a))] (Array a))
|
|
|
|
;; count : (λ [(Ref (Array t))] Int)
|
|
|
|
;; delete : (λ [(Array a)] ())
|
|
|
|
;; filter : (λ [(λ [a] Bool) (Array a)] (Array a))
|
|
|
|
;; map : (λ [(λ [a] a) (Array a)] (Array a))
|
|
|
|
;; nth : (λ [(Ref (Array t)) Int] (Ref t))
|
|
|
|
;; pop-back : (λ [(Array a)] (Array a))
|
|
|
|
;; push-back : (λ [(Array a) a] (Array a))
|
|
|
|
;; range : (λ [t t t] (Array t))
|
|
|
|
;; raw : (λ [(Array t)] (Ptr t))
|
|
|
|
;; reduce : (λ [(λ [b a] b) b (Array a)] b)
|
|
|
|
;; repeat : (λ [Int (λ [] t)] (Array t))
|
|
|
|
;; replicate : (λ [Int (Ref t)] (Array t))
|
|
|
|
;; str : (λ [(Ref (Array a))] String)
|
|
|
|
;; transform : (λ [(λ [a] b) (Array a)] (Array b))
|
|
|
|
;; -----------------------------------------------
|