|
source |
all docs
for |
all versions |
oilshell.org
Warning: Work in progress! Leave feedback on Zulip or Github if you'd like
this doc to be updated.
YSH Objects - Modules, Closures, and More
- Objects
- Proc-like objects with
__invoke__
- Func-like objects with
__call__
- Modules are invokable, with attributes
- Closures TODO - callable
- Blocks
Proc-Like
Stateful Proc Counter
Func-Like
Stateful Func Counter
Examples
Procs - Modules
invokable No state
Funcs - Closures in a Loop
The famous example.
DSLs like Hay, Flag Parser, etc.
These use procs and value.Obj?
Generated on Thu, 07 Nov 2024 17:16:57 +0000