background preloader

Learn You a Haskell for Great Good! - Chapters

Learn You a Haskell for Great Good! - Chapters

Higher-Order Perl by Mark Jason Dominus Order Higher-Order Perl online from Powell's Books Download full text here There are three versions available. You have your choice of structure or presentation, but not both. License reminder Higher-Order Perl is copyright ©2005 by Elsevier Inc. You may download the book for your personal use, but you may not distribute it to other people, either individually or by uploading it to a file-sharing service. Although the text is available for free, Higher-Order Perl is not in the public domain and is not available under a free license of any sort. This is the publisher's own PDF proof of the second version, which was sent to the printers in August 2005. This is better than the bootleg copies available from download sites in at least three ways: It is the complete text of the second printing, which incorporates many minor corrections; the bootleg copies are all bootlegs of the first printing. Download the whole book. Download individual chapters How was this created? Enjoy.

De Montfort Students Union - The Home for De Montfort University Students Lenses In Pictures - adit.io You should know what a functor is before reading this post. Read this to learn about functors. Suppose you want to make a game: Ok, now how would you move this player? moveX (Mario (Point xpos ypos)) val = Mario (Point (xpos + val) ypos) Instead, lenses allow you to write something like this: location.x `over` (+10) $ player1 Or this is the same thing: over (location . x) (+10) player1 Lenses allow you to selectively modify just a part of your data: Much clearer! location is a lens. Fmap You probably know how fmap works, Doctor Watson (read this if you don’t): Well old chap, what if you have nested functors instead? You need to use two fmaps! Now, you probably know how function composition works: What about function composition composition? “If you want to do function composition where a function has two arguments”, says Sherlock, “you need (.).(.)!” “That looks like a startled owl”, exclaims Watson. “Indeed. The type signature for function composition is: (.) :: (b -> c) -> (a -> b) -> (a -> c) Setters

Programming in Lua : contents This book is a detailed and authoritative introduction to all aspects of Lua programming written by Lua's chief architect. Programming in Lua provides a solid base to any programmer who wants to use Lua. It covers all aspects of Lua—from the basics to its API with C. When you buy a copy of this book, you help to support the Lua project. For the official definition of the Lua language, see the reference manual. Fourth edition The fourth edition updates the book to Lua 5.3 and marks a complete reorganization of the text. The book is available at the main online stores and also as an e-book. Third edition The third edition is aimed at Lua 5.2 and can be used with other versions. The book is available at the main online stores and also as an e-book. Second edition The second edition was aimed at Lua 5.1 and remains quite relevant for later versions. The book is still available at the main online stores. First edition The first edition was aimed at Lua 5.0 and remains largely relevant.

Functors, Applicatives, And Monads In Pictures - adit.io updated: May 20, 2013 Here's a simple value: And we know how to apply a function to this value: Simple enough. Lets extend this by saying that any value can be in a context. For now you can think of a context as a box that you can put a value in: Now when you apply a function to this value, you'll get different results depending on the context. data Maybe a = Nothing | Just a In a second we'll see how function application is different when something is a Just a versus a Nothing. Functors When a value is wrapped in a context, you can't apply a normal function to it: This is where fmap comes in. fmap is from the street, fmap is hip to contexts. fmap knows how to apply functions to values that are wrapped in a context. > fmap (+3) (Just 2)Just 5 Bam! Just what is a Functor, really? Functor is a typeclass. A Functor is any data type that defines how fmap applies to it. So we can do this: And fmap magically applies this function, because Maybe is a Functor. > fmap (+3) NothingNothing But in Haskell:

Programming Pearls by Jon Bentley. Addison-Wesley, Inc., 2000. ISBN 0-201-65788-0. 239 + xi pp. $24.95 This book is a collection of essays about a glamorous aspect of software: programming pearls whose origins lie beyond solid engineering, in the realm of insight and creativity. This book provides a guide for both students and experienced programmers about how to design and create programs, and how to think about programming. The book is full of small case studies, real examples, and interesting exercises for learning about how to program. Steve McConnell describes the book as ``a celebration of design in the small''. What's new on this web site? From The BookTable of ContentsPrefacePart I: Preliminaries Column 1: Cracking the Oyster Column 2: Aha! About The BookWhy a Second Edition? Supporting MaterialSource CodeWeb Sites Relevant to the BookAnimation of Sorting AlgorithmsTricks of the TradeTeaching Material Other Links

implicit.ly Squeak by Example

Related: