Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
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
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
Functional Pe(a)rls
Upcoming SlideShare
Loading in …5
×

Functional Pe(a)rls

4,339 views

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
  • Be the first to comment

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

×