Lambdas are written with =>
This commit is contained in:
parent
78e0091e3e
commit
7d898beb91
9
TODO.org
9
TODO.org
@ -644,10 +644,11 @@ awaiting confirmation, and the build order. Rules out Parinfer, wisp and
|
||||
sweet-expressions, and a simplified in-paren syntax — all thin the parens
|
||||
without removing them.
|
||||
|
||||
** WAIT A lambda with a block cannot be a call's argument
|
||||
On the author's decision. =sort-by(xs, fn(a, b)= plus a block is refused; the
|
||||
lambda has to be bound first with =let=. Proposal: a call ending in =fn(...)= and a trailing =:=
|
||||
hands the block to that lambda: =sort-by(xs, fn(a, b)):=.
|
||||
** NEXT Lambdas are written with =>
|
||||
Decided 2026-09-26: a lambda's body follows ~=>~, and ~=>~ is its only spelling
|
||||
(~fn(a) = x~ is refused for a lambda; named functions keep ~=~). A header ending in ~=>~
|
||||
takes an indented block even inside brackets, closing where the brackets close:
|
||||
~sort-by(xs, fn(a, b) =>~ plus a block.
|
||||
|
||||
** NEXT A condition struct with a parent has no sugar
|
||||
On the author's decision. =defstruct(DiskFull, :parent, IoError, [free i64])= is the fallback, with a
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user