Kof2008 Itll

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Kof2008 Itll - Presentation Transcript

    1. Introduction to Lazy Lists 2008 UJIHISA, Tatsuhiro
    2. UJIHISA Tatsuhiro • Osaka University • Ruby, Vim, Haskell and Math • http://ujihisa.nowa.jp • http://twitter.com/ujm • To the US!
    3. Targets • • Array, Enumerable, IO (File) Haskell
    4. Lazy lists
    5. • Ruby Haskell (Lazy list) Live coding Vim
    6. Lazy Lists • Lazy lists (or streams) • List (= Array in Ruby) • Only needed parts are calculated. • Haskell supports lazy lists by default. • Ruby can support it.
    7. List (=Array) in Ruby • Array class • [0, 1, 2, 3], Array.new(4) {|i| i } • a #=> [0, 1, 2, 3] a.map {|i| i * 2 } #=> [0, 2, 4, 6]
    8. List • Data structure • Insert, Delete, Access sequentially
    9. c.f. Array • Data structure • Insert, Delete, Access randomly, Size
    10. (List again) • Data structure • Insert, Delete, Access sequentially
    11. Lazy List • Data structure • Insert, Delete, Access sequentially
    12. Types of lazy lists • Boundless length lists ( ) • Undefined length lists ( ) • Defined length lists ( )
    13. How to construct lazy lists?
    14. Notations • array = 1000+ length array heavy = lambda { heavy procedure } • array.take(2).map(&heavy) • array.map(&heavy).take(2)
    15. Common case • truncation (break) • filtering (if, unless; select, reject) • mapping (=, map) • processing (???, each) folding (<<, inject)

    + ujihisaujihisa, 2 years ago

    custom

    652 views, 0 favs, 0 embeds more stats

    “Introduction to Lazy lists”
    How to use and con more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 652
      • 652 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 2
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories