For LSTMs and other RNNs (and possibly more generally) it's necessary to recursively construct terms. This can be done already, but wouldn't be efficient. It would be great to have a term like
class FoldLeft[E<:Dom](elements:Term[VarSeqDom[E]], op: (Term[E],Term[A]) => Term[A] )
extends Term[A]
For LSTMs and other RNNs (and possibly more generally) it's necessary to recursively construct terms. This can be done already, but wouldn't be efficient. It would be great to have a term like