(deftype Function [f-name arity domain range]
v/IKind
(kind [_] ::function)
f/IArity
(arity [_] arity)
Object
(toString [_] (str f-name))
#?(:clj (equals [a b] (f:= a b)))
#?@(:clj
[IFn
(invoke [this x] (literal-apply this [x]))
(invoke [this x y] (literal-apply this [x y]))
(invoke [this x y z] (literal-apply this [x y z]))
(invoke [this w x y z] (literal-apply this [w x y z]))
(applyTo [this xs] (literal-apply this xs))]
:cljs
[IEquiv
(-equiv [a b] (f:= a b))
IPrintWithWriter
(-pr-writer [x writer _]
(write-all writer (.toString x)))
IFn
(-invoke [this a]
(literal-apply this [a]))
(-invoke [this a b]
(literal-apply this [a b]))
(-invoke [this a b c]
(literal-apply this [a b c]))
(-invoke [this a b c d]
(literal-apply this [a b c d]))
(-invoke [this a b c d e]
(literal-apply this [a b c d e]))
(-invoke [this a b c d e f]
(literal-apply this [a b c d e f]))
(-invoke [this a b c d e f g]
(literal-apply this [a b c d e f g]))
(-invoke [this a b c d e f g h]
(literal-apply this [a b c d e f g h]))
(-invoke [this a b c d e f g h i]
(literal-apply this [a b c d e f g h i]))
(-invoke [this a b c d e f g h i j]
(literal-apply this [a b c d e f g h i j]))
(-invoke [this a b c d e f g h i j k]
(literal-apply this [a b c d e f g h i j k]))
(-invoke [this a b c d e f g h i j k l]
(literal-apply this [a b c d e f g h i j k l]))
(-invoke [this a b c d e f g h i j k l m]
(literal-apply this [a b c d e f g h i j k l m]))
(-invoke [this a b c d e f g h i j k l m n]
(literal-apply this [a b c d e f g h i j k l m n]))
(-invoke [this a b c d e f g h i j k l m n o]
(literal-apply this [a b c d e f g h i j k l m n o]))
(-invoke [this a b c d e f g h i j k l m n o p]
(literal-apply this [a b c d e f g h i j k l m n o p]))
(-invoke [this a b c d e f g h i j k l m n o p q]
(literal-apply this [a b c d e f g h i j k l m n o p q]))
(-invoke [this a b c d e f g h i j k l m n o p q r]
(literal-apply this [a b c d e f g h i j k l m n o p q r]))
(-invoke [this a b c d e f g h i j k l m n o p q r s]
(literal-apply this [a b c d e f g h i j k l m n o p q r s]))
(-invoke [this a b c d e f g h i j k l m n o p q r s t]
(literal-apply this [a b c d e f g h i j k l m n o p q r s t]))
(-invoke [this a b c d e f g h i j k l m n o p q r s t rest]
(literal-apply this (concat [a b c d e f g h i j k l m n o p q r s t] rest)))]))