aboutsummaryrefslogtreecommitdiff
path: root/luxc/src
diff options
context:
space:
mode:
Diffstat (limited to 'luxc/src')
-rw-r--r--luxc/src/lux/type.clj18
1 files changed, 10 insertions, 8 deletions
diff --git a/luxc/src/lux/type.clj b/luxc/src/lux/type.clj
index 84c00b978..76d580cb0 100644
--- a/luxc/src/lux/type.clj
+++ b/luxc/src/lux/type.clj
@@ -371,14 +371,16 @@
_
(&/T [type &/$Nil])))
-(defn ^:private unravel-app [fun-type]
- (|case fun-type
- (&/$Apply ?arg ?func)
- (|let [[?fun-type ?args] (unravel-app ?func)]
- (&/T [?fun-type (&/$Cons ?arg ?args)]))
-
- _
- (&/T [fun-type &/$Nil])))
+(defn ^:private unravel-app
+ ([fun-type tail]
+ (|case fun-type
+ (&/$Apply ?arg ?func)
+ (unravel-app ?func (&/$Cons ?arg tail))
+
+ _
+ (&/T [fun-type tail])))
+ ([fun-type]
+ (unravel-app fun-type &/$Nil)))
(do-template [<tag> <flatten> <at> <desc>]
(do (defn <flatten> [type]