Closed ahdinosaur closed 1 year ago
okay i tried https://github.com/ahdinosaur/rimu/tree/functions but nah
new plan sketch:
rimu-expr
Expression
rimu-value
Function
String
), "args" (Vec<String>
) "body" (Expression
)rimu-env
Environment
(previously Context
)rimu-expr-parse
String
to Expression
rimu-expr-eval
Expression
(with Environment
) to Value
rimu
a side thought, is if Expression
ends up being fully featured, then a Block
(previously Operation
) could end up just returning the Expression
that represents itself, a Template
could return the Expression
that represents itself.
Operators:
$fn
$apply
but the question is: how do we "render" a
Template::Function
if we return aValue
and there's noValue::Function
?