0
osfameron



Functional
 Pe(a)rls
Functional pearls




 x5
Functional Pe(a)rls




5 min
Functional pearls




eeek!
1. map, grep, join




map
1. map

my @names =
●

qw/
Pippo Pluto Pinco
    /;
1. map

●Hello Pippo!
●Hello Pluto!

●Hello Pinco!
1. map

● my @greetings;
● for (@names) {


●    push @greetings,
        Hello $_!;
●}
1. map

●
    my @greetings =
map
 { Hello $_! }
       @names
1. map, grep, join




grep
1. grep

●   Names that contain “i”

    –Pippo
    –Pinco
1. grep

 
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Functional Pe(a)rls
Upcoming SlideShare
Loading in...5
×

Functional Pe(a)rls

4,088

Published on

\"Lightning\" talk given at IPW 2008 on 5 fun things to do with Perl for functional programming.
Warning: may contain Evil.

Published in: Technology, Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
4,088
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
11
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "Functional Pe(a)rls"

  1. 1. osfameron Functional Pe(a)rls
  2. 2. Functional pearls x5
  3. 3. Functional Pe(a)rls 5 min
  4. 4. Functional pearls eeek!
  5. 5. 1. map, grep, join map
  6. 6. 1. map my @names = ● qw/ Pippo Pluto Pinco /;
  7. 7. 1. map ●Hello Pippo! ●Hello Pluto! ●Hello Pinco!
  8. 8. 1. map ● my @greetings; ● for (@names) { ● push @greetings, Hello $_!; ●}
  9. 9. 1. map ● my @greetings = map { Hello $_! } @names
  10. 10. 1. map, grep, join grep
  11. 11. 1. grep ● Names that contain “i” –Pippo –Pinco
  12. 12. 1. grep  
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×