learnyouahaskell.com

Please wait for loading...




      (132):

    /
     1  ~ 2014 sep 06where guardsSyntax in Functions - Learn You a Haskell for Great Good!Whereas patterns are a way of making sure a value conforms to some form and deconstructing it, guards are a way of testing whether some property of a value ...
     1  ~ 2014 aug 14learn you a haskellLearn You a Haskell for Great Good!Hey yo! This is Learn You a Haskell , the funkiest way to learn Haskell, which is the best functional programming language around. You may have heard of it. Table of contentsIntroduction - Starting Out - Syntax in Functions - Input and OutputIntroductionIntroduction. About this tutorial. Welcome to Learn You a
     2  ~ 2014 sep 12haskell tutorialTutorial aimed at people who have experience in imperative programming languages but haven't programmed in a functional language before.
     2  ~ 2014 aug 04haskell list comprehensionStarting Out - Learn You a Haskell for Great Good!For a start, we'll try calling one of the most boring functions in Haskell . ghci> succ 8 ..... List comprehensions are very similar to set comprehensions. We'll stick to ...
     3  ~ 2014 sep 12haskellHey yo! This is Learn You a Haskell , the funkiest way to learn Haskell , which is the best functional programming language around. You may have heard of it.
     4  -1 2014 sep 07haskell foldr higher orderHigher Order Functions - Learn You a Haskell for Great Good!Higher order functions aren't just a part of the Haskell experience, they pretty much are the
     4  +1 2014 aug 30good for greatChapters - Learn You a Haskell for Great Good !Learn You a Haskell for Great Good ! Introduction · About this tutorial · So what's Haskell? What you need to dive in · Starting Out · Ready, set, go! Baby's first ...
     6  +3 2014 sep 25haskell multiple definitionWhen defining functions, you can define separate function bodies for different .... Notice that if you want to bind to several variables (even if one of them is just _ ...
     7  -1 2014 oct 03types of typeTypes and Typeclasses - Learn You a Haskell for Great Good!We covered some of the basics of Haskell with only a very superficial glance at types . However, understanding the type system is a very important part of ...
     7  +5 2014 sep 02are you greatIntroduction - Learn You a Haskell for Great Good!Welcome to Learn You a Haskell for Great Good! If you 're reading this, chances are you want to learn Haskell. Well, you 've come to the right place, but let's talk ...
     8  +4 2014 sep 17pass io string to terminalInput and Output - Learn You a Haskell for Great Good!Printing a string to the terminal doesn't really have any kind of meaningful return value,
     8  +16 2014 aug 04maybe do youA Fistful of Monads - Learn You a Haskell for Great Good!And now, let's think about how we would do >>= for Maybe . Like we said, >>= takes a monadic value, and a function that takes a normal value and returns a ...
     10  -5 2014 sep 19recursionRecursion - Learn You a Haskell for Great Good!We mention recursion briefly in the previous chapter. In this chapter, we'll take a closer look at recursion , why it's important to Haskell and how we can work out ...
     10  -2 2014 sep 13learn more about greatFor a Few Monads More - Learn You a Haskell for Great Good !Exploring a few monads more will also solidify our intuition for monads. The monads that we'll be exploring are all part of the mtl package. A Haskell package is ...
     10  -1 2014 sep 10for a fewFor a Few Monads More - Learn You a Haskell for Great Good!We've also learned how to work in the IO monad, even before we knew what a monad was! In this chapter, we're going to learn about a few other monads.
     12  +19 2014 sep 08check if function is defineWhen defining functions , you can define separate function bodies for different .... Here's how we would have done it if we didn't know about pattern matching:.
     12  +1 2014 aug 14reverse polish notationFunctionally Solving Problems - Learn You a Haskell for Great Good!The downside to it is that we have to use parentheses to denote precedence. Reverse Polish notation is another way of writing down mathematical expressions.
     13  +88 2014 sep 14haskell interpreter type declarationPreviously we mentioned that Haskell has a static type system. ... We didn't have to give this function a type declaration because the compiler can infer by itself ...
     13  +2 2014 jul 27cuboid modular storageModules - Learn You a Haskell for Great Good!A Haskell program is a collection of modules where the main module loads up the other
     15  +10 2014 jul 26data list callingWhen you do import Data . List , all the functions that Data . List exports become available in the global namespace, meaning that you can call them from wherever ...
     16  +8 2014 sep 29learm the syntaxInstead of explaining their syntax , let's just dive in and make a function using guards. We're going to make a simple function that berates you differently ...
     16  +85 2014 sep 09how to write good classesTypes and Typeclasses - Learn You a Haskell for Great Good !If you write a program where you try to divide a boolean type with some number, .... The type of those two values must be a member of the Eq class (this was the ...
     17  -5 2014 sep 20a few examplesIn this chapter, we're going to learn about a few other monads. We'll see how they can .... Here are a few more examples of using applyLog: ghci> ("Tobin","Got ...
     17  -2 2014 sep 04c functorFunctors , Applicative Functors and Monoids - Learn You a Haskell In Haskell, they're described by the typeclass Functor , which has only one typeclass ..... A function a -> b -> c actually takes just one parameter of type a and then ...
     18  ~ 2014 sep 29rpn calcWhile most modern calculators use infix notation, some people still swear by RPN calculators . This is what the previous infix expression looks like in RPN: 10 4 3 ...
     18  +83 2014 jul 22get im listThe prompt here is Prelude> but because it can get longer when you load stuff
     21  +20 2014 oct 04learn about bindingsHere's how we would have done it if we didn't know about pattern matching: ..... where bindings aren't shared across function bodies of different patterns.
     22  +9 2014 aug 30map a listList module is all about lists , obviously. It provides some very useful functions for dealing with them. We've already met some of its functions (like map and filter) ...
     22  +5 2014 jul 22calling from map applicationUsing partial application ( calling functions with too few parameters, if you will) .... map takes a function and a list and applies that function to every element in the ...
     23  -7 2014 sep 11map parameterEvery function in Haskell officially only takes one parameter . ..... map takes a function and a list and applies that function to every element in the list, producing a ...
     25  +16 2014 aug 14real world haskellFAQ - Learn You a Haskell for Great Good!There are loads of awesome tutorials out there, but I'd just like to point out how great Real World Haskell is. It's really great. I feel it complements this tutorial ...
     27  ~ 2014 aug 13be and youHey yo! This is Learn You a Haskell, the funkiest way to learn Haskell, which is the best functional programming language around. You may have heard of it.
     28  ~ 2014 sep 19type to learnMaking Our Own Types and Typeclasses - Learn You a Haskell for In this chapter, we'll learn how to make our own and how to put them to work! ... Let's see how the Bool type is defined in the standard library. data Bool = False |  ...
     28  -10 2014 aug 05function in functionHaskell functions can take functions as parameters and return functions as return values. A function that does either of those is called a higher order function .
     30  +2 2014 sep 18capitalize haskellFor a start, we'll try calling one of the most boring functions in Haskell . ghci> succ 8; 9 .... The first is that in the function name we didn't capitalize Conan's name.
     30  -1 2014 sep 17haskell capitalize
     30  +14 2014 sep 01lists of listIn Haskell, lists are a homogenous data structure. It stores several elements of the same type. That means that we can have a list of integers or a list of characters ...
     32  +45 2014 sep 06this type ofPreviously we mentioned that Haskell has a static type system. The type of every expression is known at compile time, which leads to safer code. If you write a ...
     33  -3 2014 sep 12types
     37  +9 2014 sep 27great signaturesThat's good because it's better to catch such errors at compile time instead of having your program crash. .... What's the type signature of the == function?
     38  +26 2014 sep 23how to do quick sortIn this chapter, we'll take a closer look at recursion, why it's important to Haskell and how we can work ..... There's a very cool algoritm for sorting called quicksort .
     38  +23 2014 sep 03few a few
     39  +3 2014 sep 22types of map dataWell, one way is to use the data keyword to define a type .
     40  +61 2014 sep 30for the greater good
     43  -33 2014 sep 29a type of
     43  -4 2014 sep 26building elements treeZippers - Learn You a Haskell for Great Good!So our tree is either empty or it's a node that has an element and two sub- trees . ...... from break as the focus and build a breadcrumb that has all the data it needs.
     43  -9 2014 sep 03words list splittingThe Haskell standard library is split into modules, each of them contains
     43  -16 2014 aug 18type it inIn the previous chapters, we covered some existing Haskell types and typeclasses. In this chapter, we'll learn how to make our own and how to put them to work!
     44  -3 2014 sep 14learn how to typeHowever, understanding the type system is a very important part of learning Haskell. A type is a kind of label that every expression has. It tells us in which ...
     45  +30 2014 sep 07programming language learnThis tutorial is aimed at people who have experience in imperative programming languages (C, C++, Java, Python …) but haven't programmed in a functional ...
     45  -20 2014 jul 21script reader moduleThe syntax for importing modules in a Haskell script is import < module name>. ... Reading the source code of some modules is a really good way to learn ...
     48  +16 2014 sep 26learn fibonacciFor instance, the fibonacci sequence is defined recursively. First, we define the first two fibonacci numbers non-recursively. We say that F(0) = 0 and F(1) = 1, ...
     48  +38 2014 sep 15quick sortAnd now, we want to sort them! There's a very cool algoritm for sorting called quicksort . It's a very clever way of sorting items. While it takes upwards of 10 lines to ...
     48  +41 2014 sep 12print variable type in cBecause it's not in capital case it's actually a type variable .
     48  +8 2014 sep 05haskell web
     50  +51 2014 sep 22get variable type in c
     51  ~ 2014 sep 18books to read add urlis read as "has type of". ... So we read that as it being a list of characters. ..... We do that by adding :: at the end of the expression and then specifying a type.
     51  ~ 2014 aug 26to by you
     52  +40 2014 sep 29learn a programming language
     52  +3 2014 sep 22introductionIntroduction . About this tutorial. Welcome to Learn You a Haskell for Great Good! If you're reading this, chances are you want to learn Haskell. Well, you've come ...
     53  ~ 2014 sep 15haskell könyvChapters - Learn You a Haskell for Great Good!Learn You a Haskell for Great Good! Introduction · About this tutorial · So what's Haskell ? What you need to dive in · Starting Out · Ready, set, go! Baby's first ...
     53  +29 2014 sep 02greater good for allLearn You a Haskell for Great Good !
     53  +48 2014 aug 31lucky number for falllucky :: (Integral a) => a -> String; lucky 7 = " LUCKY NUMBER SEVEN! ... catch all the numbers and they wouldn't have a chance to fall through and be checked ...
     56  +45 2014 sep 28good names for pipesSyntax in Functions - Learn You a Haskell for Great Good !This chapter will cover some of Haskell's cool syntactic constructs and we'll ..... Guards are indicated by pipes that follow a function's name and its parameters.
     57  +44 2014 jul 16typing important learn
     58  +43 2014 sep 28learning programming languages
     58  +43 2014 aug 17recursive function exampleRecursion is actually a way of defining functions in which the function is applied ... Let's take an example list of numbers and check out how this would work on ...
     59  ~ 2014 aug 20add list of numbersThere's also a very clever way for zipping infinite numbers of lists , but we're not ..... Then we add the shift amount to each number before converting the list of  ...
     59  ~ 2014 aug 03bytes of learningThe Maybe Int is for how big the chunk should be, in bytes . If it's Nothing, then the operating system determines the chunk size. NoBuffering means that it will be ...
     60  ~ 2014 sep 27get item on index of list cFor example, in C , you use parentheses to call functions like foo(), bar(1) or baz(3 , "haha"). Like we ..... If you want to get an element out of a list by index , use !
     60  +7 2014 sep 19print one line ifFirst , we get a line from the terminal by performing getLine call that line line . .... If it's not empty, then print the first character of the string by doing putChar and ...
     60  +20 2014 aug 17types of dataSo far, we've run into a lot of data types . Bool, Int, Char, Maybe, etc. But how do we make our own? Well, one way is to use the data keyword to define a type .
     62  +7 2014 sep 13what happen to pure readerWith those two parts separated, we can still reason about our pure program and ..... Note that due to buffering, reading of the characters won't actually happen  ...
     62  ~ 2014 jul 26list warranty registration numbIf we write a number , we don't have to tell Haskell it's a number . .... [a] -> Bool because it uses == over a list to check whether some value we're looking for is in it.
     65  ~ 2014 sep 12syntax definitionWhen defining functions, you can define separate function bodies for different patterns. This leads to really neat code that's simple and readable. You can pattern ...
     65  +26 2014 aug 27making a listList module, which has a bunch of useful functions for working with lists and use a function that it exports to create a function that tells us how many unique ...
     65  -15 2014 jul 22circle tree vectorA circle could be denoted as (43.1, 55.0, 10.4) where the first and second fields are the
     66  +13 2014 sep 23haskell bearYeah, I know it's not but bear with me. A little pitfall to watch out for here is negating numbers. If we want to have a negative number, it's always best to surround it ...
     66  +21 2014 aug 12order from youHigher order functions aren't just a part of the Haskell experience, they pretty much are the Haskell experience. It turns out that if you want to define computations ...
     67  +23 2014 sep 30ready set goStarting Out. Ready , set , go ! egg Alright, let's get started! If you're the sort of horrible person who doesn't read introductions to things and you skipped it, you ...
     67  -17 2014 sep 16how to use nothingLike, what if we have Just (*3), how do we apply that to Just 5? What if we don't want to apply it to Just 5 but to a Nothing instead? Or if we have [(*2),(+4)], how ...
     70  ~ 2014 oct 04functional programming languageThis tutorial is aimed at people who have experience in imperative programming languages (C, C++, Java, Python …) but haven't programmed in a functional  ...
     71  +20 2014 sep 02line number writingBut now, after eight or so chapters, we're finally going to write our first real
     72  +7 2014 sep 25synonyms for goodOur data type is good , although it could be better. Let's make an ...... Here's how the standard library defines String as a synonym for [Char]. type String = [Char].
     72  +29 2014 sep 14youserialsLearn You a Haskell for Great Good! Introduction · About this tutorial · So what's Haskell? What you need to dive in · Starting Out · Ready, set, go! Baby's first ...
     72  +21 2014 aug 24common greater goodModules - Learn You a Haskell for Great Good !The Haskell standard library is split into modules, each of them contains functions and types that are somehow related and serve some common purpose.
     72  -17 2014 jul 31composing with three elementsNext up, 3 is used as the accumulator value and 5 as the current element and 8 ..... meaning that composing two functions produces a new function that, when ...
     73  +28 2014 aug 23learn programming language
     73  +28 2014 aug 18hobo split testingTesting it out produces pretty predictable results (remember to append this function ..... So if you're not in GHCI, it's better to split longer list comprehensions across multiple ..... "grouchy pope","scheming hobo ","scheming frog","scheming pope"].
     73  -23 2014 aug 07few and a few
     74  +8 2014 aug 21the writers coinNow let's put the Writer monad in the chamber and see what happens when we
     75  +26 2014 sep 29lucky scopeWhen you call lucky , the patterns will be checked from top to bottom and when it conforms to a ...... They can also be used to introduce functions in a local scope :.
     76  +25 2014 sep 10file get contentsBefore we move on to files , let's take a look at some functions that are useful ..... We run the getContents I/O action and name the string it produces contents .
     77  ~ 2014 sep 23print var type cHere we see that doing :t on an expression prints out the expression followed by : : and its type . .... Because it's not in capital case it's actually a type variable . ... have names longer than one character, we usually give them names of a, b, c , d …
     78  -33 2014 sep 13learn
    1 2 of 2 pages