Skip to main content

Home/ Haskell/ Group items tagged good

Rss Feed Group items tagged

J.A. Alonso

Apprendre Haskell vous fera le plus grand bien ! - 0 views

  •  
    Traducción francesa del libro "Learn You a Haskell for Great Good!".
Javier Neira

Haskell: The Confusing Parts - 0 views

  • f $ x = f x(f . g) x = f (g x)-- Some quick examples of using these. The following line...putStrLn (take 12 (map foo (bar ++ "ack")))-- ...can be rewritten as...putStrLn $ take 12 $ map foo $ bar ++ "ack"(putStrLn . take 12 . map foo) (bar ++ "ack")putStrLn . take 12 . map foo $ bar ++ "ack" In terms of good Haskell style, the last example above is preferable to the others. By the way, note that ($) has the lowest precedence (zero) of any operator, so you can almost always use arbitrary syntax on either side of it.
  • -- Actual definitions:f $ x = f x(f . g) x = f (g x)-- Some quick examples of using these. The following line...putStrLn (take 12 (map foo (bar ++ "ack")))-- ...can be rewritten as...putStrLn $ take 12 $ map foo $ bar ++ "ack"(putStrLn . take 12 . map foo) (bar ++ "ack")putStrLn . take 12 . map foo $ bar ++ "ack"
  • putStrLn (take 12 (map foo (bar ++ "ack")))-- ...can be rewritten as...putStrLn $ take 12 $ map foo $ bar ++ "ack"(putStrLn . take 12 . map foo) (bar ++ "ack")putStrLn . take 12 . map foo $ bar ++ "ack"
  • ...7 more annotations...
  • putStrLn (take 12 (map foo (bar ++ "ack")))
  • anywhere you might write \x -> foo x [1..10], you should instead write flip foo [1..10], where flip is a standard Prelude function that flips the first two arguments of whatever function you give it
  • two arguments of whatever
  • anywhere you might write \x -> foo x [1..10], you should instead write flip foo [1..10], where flip is a standard Prelude function that flips the first
  • The curry and uncurry functions stand in for \f x y -> f (x, y) and \f (x, y) -> f x y, respectively.
  • The curry and uncurry functions stand in for \f x y -> f (x, y)
  • I will point out that return is, in fact, not a return statement. It’s a function, and an inappropriately named function, at that. Writing return () in your do block will not cause the function to return.
  •  
    If you're used to the C family of languages, or the closely related family of "scripting languages," Haskell's syntax (mainly) is a bit baffling at first. For some people, it can even seem like it's sneaking out from under you every time you think you understand it. This is sort of a FAQ for people who are new to Haskell, or scared away by its syntax.
Javier Neira

mwotton's Hubris at master - GitHub - 0 views

  •  
    Hubris is a bridge between Ruby and Haskell, between love and bondage, between slothful indolence and raw, blazing speed. Hubris will wash your car, lie to your boss, and salvage your love life. If you are very, very lucky, it might also let you get some functional goodness into your ruby programs through the back door.
Justin Pierce

Tested And Trusted Bookkeeping Service - 1 views

When I opened my mini grocery last year, I immediately asked Bookkeepers On Call to do the bookkeeping services for me because I know it from my sister that they provide the most trusted bookkeeper...

started by Justin Pierce on 29 Oct 12 no follow-up yet
Javier Neira

Learn You a Haskell for Great Good! - Types and Typeclasses - 0 views

  • That's why we can use explicit type annotations. Type annotations are a way of explicitly saying what the type of an expression should be. We do that by adding :: at the end of the expression and then specifying a type.
1 - 6 of 6
Showing 20 items per page