>>91108270
>because lisp originally only had what you call 'dynamic scope' which really is indefinite scope and dynamic extent. it's more flexible than lexical scoping, which was added later
Bingo thanks anon, I will test what you can and can not do in common lisp and perl to see how expressive/limiting it is knowing this.
>you'd use (defn ...) for that. the point of #() is making anonymous functions to supply to HOFs where you may ignore one or more args
I get it
$ perl -E 'sub apply { my $f=shift; $f->(@_) } $add = sub { my ($a, $b)=@_; $a + $b }; say apply($add, 10..20)'
21