lambda - a shortcut for sub {...}
Instead of:
my $code = sub {...};
Just:
my $code = λ{...};
Note: If your perldoc (or terminal (or browser)) isn't properly rendering unicode, the above looks like an 'I' followed by a double arrow (or maybe just an 'X'.) It is a unicode lowercase lambda (0x3BB.)
This module has import() and unimport() methods which mimic utf8.pm. Thus, instead of saying 'use utf8; use lambda;', you can simply say 'use lambda;'.
use utf8; use lambda;
use lambda;
The caveat to this is that 'no lambda;' also means 'no utf8;'. I blame $^H (suggestions welcome, and yes 5.10 might require this to change.)
no lambda;
no utf8;
$^H
My .vimrc has:
imap <C-S-L> λ{}<ESC>:set encoding=utf8<CR>i
In insert mode (only), this types the lambda and matching braces, sets the encoding, then puts your cursor between the braces.
Puts λ in your symbol table, turns on utf8 parsing.
Removes λ from your symbol table, turns off utf8 parsing.
Eric Wilhelm @ <ewilhelm at cpan dot org>
http://scratchcomputing.com/
If you found this module on CPAN, please report any bugs or feature requests through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
If you pulled this development version from my /svn/, please contact me directly.
Copyright (C) 2007 Eric L. Wilhelm, All Rights Reserved.
Absolutely, positively NO WARRANTY, neither express or implied, is offered with this software. You use this software at your own risk. In case of loss, no person or entity owes you anything whatsoever. You have been warned.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install lambda, copy and paste the appropriate command in to your terminal.
cpanm
cpanm lambda
CPAN shell
perl -MCPAN -e shell install lambda
For more information on module installation, please visit the detailed CPAN module installation guide.