Thanks for sharing! Le mar. 26 mars 2019 à 21:28, Linus Björnstam <linus.inter...@fastmail.se> a écrit :
> Hello everybody! > > I have written a bunch of small libraries to scratch some itches, and I > thought now might be a good time to actually release them here. > > Megacut is the first of a few. It is a lambda shorthand, like cut, but > with different semantics and more features: > > (megacut (apply + (/ %1 %2) %&)) > > (lambda (%1 %2 . %&) (apply + (/ %1 %2) %&)) > > Using guile's read-hash-extend #%(+ %1 %2) gets expanded to (megacut (+ %1 > %2)). > > The workings are simple: positional arguments are %n (where n is a > positive integer) and rest arguments are %&. It adds as many positional > arguments as n is big so #%(display %2) becomes (lambda (%1 %2) (display > %2)). > > The symbol % is a shorthand for %1, so #%(+ % %) is the same as #%(+ %1 > %1). > > It can be found here: https://bitbucket.org/bjoli/megacut > > Play with it if you want. It is licensed under a BSD-styled license. My > linux box died recently, so I haven't been able to package it for guix. > > Best regards > Linus Björnstam > >