wolfe-pack / wolfe

Wolfe Language and Engine
https://wolfe-pack.github.io/wolfe
Apache License 2.0
135 stars 17 forks source link

Avoid templates as parts of terms #166

Open riedelcastro opened 8 years ago

riedelcastro commented 8 years ago

Currently SeqMap (and FoldLeft etc) are terms with "template" arguments (Term => Term functions). Instead of these templates we should use (variable, term) pairs where the variable identifies the slot in the body term. The benefit of this is that we can pattern match on such terms (this isn't possible for scala functions).

When users create the SeqMap via the .map method we should still use templates though. The .map call will then create the corresponding (variable,term) pair to populate the SeqMap term.

riedelcastro commented 8 years ago

Done now for SeqMap, should still happen for Unfoldl etc.