Haskell Notes for Professionals book

    Amazing collection of free programming books

    Collecting
    Free
    Amazing collection of free programming books

    The Notes for Professionals book is compiled from Stack Overflow Documentation, the content is written by the beautiful people at Stack Overflow. Text content is released under Creative Commons BY-SA. See credits at the end of this book whom contributed to the various chapters. Images may be copyright of their respective owners unless otherwise specified

    Book created for educational purposes and is not affiliated with group(s), company(s) nor Stack Overflow. All trademarks belong to their respective company owners

    https://goalkicker.com/

    Content

    1-1Content list
    1-2About
    1-3Chapter 1: Getting started with Haskell Language
    1-4Section 1.1: Getting started
    1-5Section 1.2: Hello, World!
    1-6Section 1.3: Factorial
    1-7Section 1.4: Fibonacci, Using Lazy Evaluation
    1-8Section 1.5: Primes
    1-9Section 1.6: Declaring Values
    1-10Chapter 2: Overloaded Literals
    1-11Section 2.1: Strings
    1-12Section 2.2: Floating Numeral
    1-13Section 2.3: Integer Numeral
    1-14Section 2.4: List Literals
    1-15Chapter 3: Foldable
    1-16Section 3.1: Definition of Foldable
    1-17Section 3.2: An instance of Foldable for a binary tree
    1-18Section 3.3: Counting the elements of a Foldable structure
    1-19Section 3.4: Folding a structure in reverse
    1-20Section 3.5: Flattening a Foldable structure into a list
    1-21Section 3.6: Performing a side-eect for each element of a Foldable structure
    1-22Section 3.7: Flattening a Foldable structure into a Monoid
    1-23Section 3.8: Checking if a Foldable structure is empty
    1-24Chapter 4: Traversable
    1-25Section 4.1: Definition of Traversable
    1-26Section 4.2: Traversing a structure in reverse
    1-27Section 4.3: An instance of Traversable for a binary tree
    1-28Section 4.4: Traversable structures as shapes with contents
    1-29Section 4.5: Instantiating Functor and Foldable for a Traversable structure
    1-30Section 4.6: Transforming a Traversable structure with the aid of an accumulating parameter
    1-31Section 4.7: Transposing a list of lists
    1-32Chapter 5: Lens
    1-33Section 5.1: Lenses for records
    1-34Section 5.2: Manipulating tuples with Lens
    1-35Section 5.3: Lens and Prism
    1-36Section 5.4: Stateful Lenses
    1-37Section 5.5: Lenses compose
    1-38Section 5.6: Writing a lens without Template Haskell
    1-39Section 5.7: Fields with makeFields
    1-40Section 5.8: Classy Lenses
    1-41Section 5.9: Traversals
    1-42Chapter 6: QuickCheck
    1-43Section 6.1: Declaring a property
    1-44Section 6.2: Randomly generating data for custom types
    1-45Section 6.3: Using implication (==>) to check properties with preconditions
    1-46Section 6.4: Checking a single property
    1-47Section 6.5: Checking all the properties in a file
    1-48Section 6.6: Limiting the size of test data
    1-49Chapter 7: Common GHC Language Extensions
    1-50Section 7.1: RankNTypes
    1-51Section 7.2: OverloadedStrings
    1-52Section 7.3: BinaryLiterals
    1-53Section 7.4: ExistentialQuantification
    1-54Section 7.5: LambdaCase
    1-55Section 7.6: FunctionalDependencies
    1-56Section 7.7: FlexibleInstances
    1-57Section 7.8: GADTs
    1-58Section 7.9: TupleSections
    1-59Section 7.10: OverloadedLists
    1-60Section 7.11: MultiParamTypeClasses
    1-61Section 7.12: UnicodeSyntax
    1-62Section 7.13: PatternSynonyms
    1-63Section 7.14: ScopedTypeVariables
    1-64Section 7.15: RecordWildCards
    1-65Chapter 8: Free Monads
    1-66Section 8.1: Free monads split monadic computations into data structures and interpreters
    1-67Section 8.2: The Freer monad
    1-68Section 8.3: How do foldFree and iterM work?
    1-69Section 8.4: Free Monads are like fixed points
    1-70Chapter 9: Type Classes
    1-71Section 9.1: Eq
    1-72Section 9.2: Monoid
    1-73Section 9.3: Ord
    1-74Section 9.4: Num
    1-75Section 9.5: Maybe and the Functor Class
    1-76Section 9.6: Type class inheritance: Ord type class
    1-77Chapter 10: IO
    1-78Section 10.1: Getting the 'a' "out of" 'IO a'
    1-79Section 10.2: IO defines your program's `main` action
    1-80Section 10.3: Checking for end-of-file conditions
    1-81Section 10.4: Reading all contents of standard input into a string
    1-82Section 10.5: Role and Purpose of IO
    1-83Section 10.6: Writing to stdout
    1-84Section 10.7: Reading words from an entire file
    1-85Section 10.8: Reading a line from standard input
    1-86Section 10.9: Reading from `stdin`
    1-87Section 10.10: Parsing and constructing an object from standard input
    1-88Section 10.11: Reading from file handles
    1-89Chapter 11: Record Syntax
    1-90Section 11.1: Basic Syntax
    1-91Section 11.2: Defining a data type with field labels
    1-92Section 11.3: RecordWildCards
    1-93Section 11.4: Copying Records while Changing Field Values
    1-94Section 11.5: Records with newtype
    1-95Chapter 12: Partial Application
    1-96Section 12.1: Sections
    1-97Section 12.2: Partially Applied Adding Function
    1-98Section 12.3: Returning a Partially Applied Function
    1-99Chapter 13: Monoid
    1-100Section 13.1: An instance of Monoid for lists
    1-101Section 13.2: Collapsing a list of Monoids into a single value
    1-102Section 13.3: Numeric Monoids
    1-103Section 13.4: An instance of Monoid for ()
    1-104Chapter 14: Category Theory
    1-105Section 14.1: Category theory as a system for organizing abstraction
    1-106Section 14.2: Haskell types as a category
    1-107Section 14.3: Definition of a Category
    1-108Section 14.4: Coproduct of types in Hask
    1-109Section 14.5: Product of types in Hask
    1-110Section 14.6: Haskell Applicative in terms of Category Theory
    1-111Chapter 15: Lists
    1-112Section 15.1: List basics
    1-113Section 15.2: Processing lists
    1-114Section 15.3: Ranges
    1-115Section 15.4: List Literals
    1-116Section 15.5: List Concatenation
    1-117Section 15.6: Accessing elements in lists
    1-118Section 15.7: Basic Functions on Lists
    1-119Section 15.8: Transforming with `map`
    1-120Section 15.9: Filtering with `filter`
    1-121Section 15.10: foldr
    1-122Section 15.11: Zipping and Unzipping Lists
    1-123Section 15.12: foldl
    1-124Chapter 16: Sorting Algorithms
    1-125Section 16.1: Insertion Sort
    1-126Section 16.2: Permutation Sort
    1-127Section 16.3: Merge Sort
    1-128Section 16.4: Quicksort
    1-129Section 16.5: Bubble sort
    1-130Section 16.6: Selection sort
    1-131Chapter 17: Type Families
    1-132Section 17.1: Datatype Families
    1-133Section 17.2: Type Synonym Families
    1-134Section 17.3: Injectivity
    1-135Chapter 18: Monads
    1-136Section 18.1: Definition of Monad
    1-137Section 18.2: No general way to extract value from a monadic computation
    1-138Section 18.3: Monad as a Subclass of Applicative
    1-139Section 18.4: The Maybe monad
    1-140Section 18.5: IO monad
    1-141Section 18.6: List Monad
    1-142Section 18.7: do-notation
    1-143Chapter 19: Stack
    1-144Section 19.1: Profiling with Stack
    1-145Section 19.2: Structure
    1-146Section 19.3: Build and Run a Stack Project
    1-147Section 19.4: Viewing dependencies
    1-148Section 19.5: Stack install
    1-149Section 19.6: Installing Stack
    1-150Section 19.7: Creating a simple project
    1-151Section 19.8: Stackage Packages and changing the LTS (resolver) version
    1-152Chapter 20: Generalized Algebraic Data Types
    1-153Section 20.1: Basic Usage
    1-154Chapter 21: Recursion Schemes
    1-155Section 21.1: Fixed points
    1-156Section 21.2: Primitive recursion
    1-157Section 21.3: Primitive corecursion
    1-158Section 21.4: Folding up a structure one layer at a time
    1-159Section 21.5: Unfolding a structure one layer at a time
    1-160Section 21.6: Unfolding and then folding, fused
    1-161Chapter 22: Data.Text
    1-162Section 22.1: Text Literals
    1-163Section 22.2: Checking if a Text is a substring of another Text
    1-164Section 22.3: Stripping whitespace
    1-165Section 22.4: Indexing Text
    1-166Section 22.5: Splitting Text Values
    1-167Section 22.6: Encoding and Decoding Text
    1-168Chapter 23: Using GHCi
    1-169Section 23.1: Breakpoints with GHCi
    1-170Section 23.2: Quitting GHCi
    1-171Section 23.3: Reloading a already loaded file
    1-172Section 23.4: Starting GHCi
    1-173Section 23.5: Changing the GHCi default prompt
    1-174Section 23.6: The GHCi configuration file
    1-175Section 23.7: Loading a file
    1-176Section 23.8: Multi-line statements
    1-177Chapter 24: Strictness
    1-178Section 24.1: Bang Patterns
    1-179Section 24.2: Lazy patterns
    1-180Section 24.3: Normal forms
    1-181Section 24.4: Strict fields
    1-182Chapter 25: Syntax in Functions
    1-183Section 25.1: Pattern Matching
    1-184Section 25.2: Using where and guards
    1-185Section 25.3: Guards
    1-186Chapter 26: Functor
    1-187Section 26.1: Class Definition of Functor and Laws
    1-188Section 26.2: Replacing all elements of a Functor with a single value
    1-189Section 26.3: Common instances of Functor
    1-190Section 26.4: Deriving Functor
    1-191Section 26.5: Polynomial functors
    1-192Section 26.6: Functors in Category Theory
    1-193Chapter 27: Testing with Tasty
    1-194Section 27.1: SmallCheck, QuickCheck and HUnit
    1-195Chapter 28: Creating Custom Data Types
    1-196Section 28.1: Creating a data type with value constructor parameters
    1-197Section 28.2: Creating a data type with type parameters
    1-198Section 28.3: Creating a simple data type
    1-199Section 28.4: Custom data type with record parameters
    1-200Chapter 29: Reactive-banana
    1-201Section 29.1: Injecting external events into the library
    1-202Section 29.2: Event type
    1-203Section 29.3: Actuating EventNetworks
    1-204Section 29.4: Behavior type
    1-205Chapter 30: Optimization
    1-206Section 30.1: Compiling your Program for Profiling
    1-207Section 30.2: Cost Centers
    1-208Chapter 31: Concurrency
    1-209Section 31.1: Spawning Threads with `forkIO`
    1-210Section 31.2: Communicating between Threads with `MVar`
    1-211Section 31.3: Atomic Blocks with Software Transactional Memory
    1-212Chapter 32: Function composition
    1-213Section 32.1: Right-to-left composition
    1-214Section 32.2: Composition with binary function
    1-215Section 32.3: Left-to-right composition
    1-216Chapter 33: Databases
    1-217Section 33.1: Postgres
    1-218Chapter 34: Data.Aeson - JSON in Haskell
    1-219Section 34.1: Smart Encoding and Decoding using Generics
    1-220Section 34.2: A quick way to generate a Data.Aeson.Value
    1-221Section 34.3: Optional Fields
    1-222Chapter 35: Higher-order functions
    1-223Section 35.1: Basics of Higher Order Functions
    1-224Section 35.2: Lambda Expressions
    1-225Section 35.3: Currying
    1-226Chapter 36: Containers - Data.Map
    1-227Section 36.1: Importing the Module
    1-228Section 36.2: Monoid instance
    1-229Section 36.3: Constructing
    1-230Section 36.4: Checking If Empty
    1-231Section 36.5: Finding Values
    1-232Section 36.6: Inserting Elements
    1-233Section 36.7: Deleting Elements
    1-234Chapter 37: Fixity declarations
    1-235Section 37.1: Associativity
    1-236Section 37.2: Binding precedence
    1-237Section 37.3: Example declarations
    1-238Chapter 38: Web Development
    1-239Section 38.1: Servant
    1-240Section 38.2: Yesod
    1-241Chapter 39: Vectors
    1-242Section 39.1: The Data.Vector Module
    1-243Section 39.2: Filtering a Vector
    1-244Section 39.3: Mapping (`map`) and Reducing (`fold`) a Vector
    1-245Section 39.4: Working on Multiple Vectors
    1-246Chapter 40: Cabal
    1-247Section 40.1: Working with sandboxes
    1-248Section 40.2: Install packages
    1-249Chapter 41: Type algebra
    1-250Section 41.1: Addition and multiplication
    1-251Section 41.2: Functions
    1-252Section 41.3: Natural numbers in type algebra
    1-253Section 41.4: Recursive types
    1-254Section 41.5: Derivatives
    1-255Chapter 42: Arrows
    1-256Section 42.1: Function compositions with multiple channels
    1-257Chapter 43: Typed holes
    1-258Section 43.1: Syntax of typed holes
    1-259Section 43.2: Semantics of typed holes
    1-260Section 43.3: Using typed holes to define a class instance
    1-261Chapter 44: Rewrite rules (GHC)
    1-262Section 44.1: Using rewrite rules on overloaded functions
    1-263Chapter 45: Date and Time
    1-264Section 45.1: Finding Today's Date
    1-265Section 45.2: Adding, Subtracting and Comparing Days
    1-266Chapter 46: List Comprehensions
    1-267Section 46.1: Basic List Comprehensions
    1-268Section 46.2: Do Notation
    1-269Section 46.3: Patterns in Generator Expressions
    1-270Section 46.4: Guards
    1-271Section 46.5: Parallel Comprehensions
    1-272Section 46.6: Local Bindings
    1-273Section 46.7: Nested Generators
    1-274Chapter 47: Streaming IO
    1-275Section 47.1: Streaming IO
    1-276Chapter 48: Google Protocol Buers
    1-277Section 48.1: Creating, building and using a simple .proto file
    1-278Chapter 49: Template Haskell & QuasiQuotes
    1-279Section 49.1: Syntax of Template Haskell and Quasiquotes
    1-280Section 49.2: The Q type
    1-281Section 49.3: An n-arity curry
    1-282Chapter 50: Phantom types
    1-283Section 50.1: Use Case for Phantom Types: Currencies
    1-284Chapter 51: Modules
    1-285Section 51.1: Defining Your Own Module
    1-286Section 51.2: Exporting Constructors
    1-287Section 51.3: Importing Specific Members of a Module
    1-288Section 51.4: Hiding Imports
    1-289Section 51.5: Qualifying Imports
    1-290Section 51.6: Hierarchical module names
    1-291Chapter 52: Tuples (Pairs, Triples, ...)
    1-292Section 52.1: Extract tuple components
    1-293Section 52.2: Strictness of matching a tuple
    1-294Section 52.3: Construct tuple values
    1-295Section 52.4: Write tuple types
    1-296Section 52.5: Pattern Match on Tuples
    1-297Section 52.6: Apply a binary function to a tuple (uncurrying)
    1-298Section 52.7: Apply a tuple function to two arguments (currying)
    1-299Section 52.8: Swap pair components
    1-300Chapter 53: Graphics with Gloss
    1-301Section 53.1: Installing Gloss
    1-302Section 53.2: Getting something on the screen
    1-303Chapter 54: State Monad
    1-304Section 54.1: Numbering the nodes of a tree with a counter
    1-305Chapter 55: Pipes
    1-306Section 55.1: Producers
    1-307Section 55.2: Connecting Pipes
    1-308Section 55.3: Pipes
    1-309Section 55.4: Running Pipes with runEect
    1-310Section 55.5: Consumers
    1-311Section 55.6: The Proxy monad transformer
    1-312Section 55.7: Combining Pipes and Network communication
    1-313Chapter 56: Infix operators
    1-314Section 56.1: Prelude
    1-315Section 56.2: Finding information about infix operators
    1-316Section 56.3: Custom operators
    1-317Chapter 57: Parallelism
    1-318Section 57.1: The Eval Monad
    1-319Section 57.2: rpar
    1-320Section 57.3: rseq
    1-321Chapter 58: Parsing HTML with taggy-lens and lens
    1-322Section 58.1: Filtering elements from the tree
    1-323Section 58.2: Extract the text contents from a div with a particular id
    1-324Chapter 59: Foreign Function Interface
    1-325Section 59.1: Calling C from Haskell
    1-326Section 59.2: Passing Haskell functions as callbacks to C code
    1-327Chapter 60: Gtk3
    1-328Section 60.1: Hello World in Gtk
    1-329Chapter 61: Monad Transformers
    1-330Section 61.1: A monadic counter
    1-331Chapter 62: Bifunctor
    1-332Section 62.1: Definition of Bifunctor
    1-333Section 62.2: Common instances of Bifunctor
    1-334Section 62.3: first and second
    1-335Chapter 63: Proxies
    1-336Section 63.1: Using Proxy
    1-337Section 63.2: The "polymorphic proxy" idiom
    1-338Section 63.3: Proxy is like ()
    1-339Chapter 64: Applicative Functor
    1-340Section 64.1: Alternative definition
    1-341Section 64.2: Common instances of Applicative
    1-342Chapter 65: Common monads as free monads
    1-343Section 65.1: Free Empty ~~ Identity
    1-344Section 65.2: Free Identity ~~ (Nat,) ~~ Writer Nat
    1-345Section 65.3: Free Maybe ~~ MaybeT (Writer Nat)
    1-346Section 65.4: Free (Writer w) ~~ Writer [w]
    1-347Section 65.5: Free (Const c) ~~ Either c
    1-348Section 65.6: Free (Reader x) ~~ Reader (Stream x)
    1-349Chapter 66: Common functors as the base of cofree comonads
    1-350Section 66.1: Cofree Empty ~~ Empty
    1-351Section 66.2: Cofree (Const c) ~~ Writer c
    1-352Section 66.3: Cofree Identity ~~ Stream
    1-353Section 66.4: Cofree Maybe ~~ NonEmpty
    1-354Section 66.5: Cofree (Writer w) ~~ WriterT w Stream
    1-355Section 66.6: Cofree (Either e) ~~ NonEmptyT (Writer e)
    1-356Section 66.7: Cofree (Reader x) ~~ Moore x
    1-357Chapter 67: Arithmetic
    1-358Section 67.1: Basic examples
    1-359Section 67.2: `Could not deduce (Fractional Int) ...`
    1-360Section 67.3: Function examples
    1-361Chapter 68: Role
    1-362Section 68.1: Nominal Role
    1-363Section 68.2: Representational Role
    1-364Section 68.3: Phantom Role
    1-365Chapter 69: Arbitrary-rank polymorphism with RankNTypes
    1-366Section 69.1: RankNTypes
    1-367Chapter 70: GHCJS
    1-368Section 70.1: Running "Hello World!" with Node.js
    1-369Chapter 71: XML
    1-370Section 71.1: Encoding a record using the `xml` library
    1-371Chapter 72: Reader / ReaderT
    1-372Section 72.1: Simple demonstration
    1-373Chapter 73: Function call syntax
    1-374Section 73.1: Partial application - Part 1
    1-375Section 73.2: Partial application - Part 2
    1-376Section 73.3: Parentheses in a basic function call
    1-377Section 73.4: Parentheses in embedded function calls
    1-378Chapter 74: Logging
    1-379Section 74.1: Logging with hslogger
    1-380Chapter 75: Attoparsec
    1-381Section 75.1: Combinators
    1-382Section 75.2: Bitmap - Parsing Binary Data
    1-383Chapter 76: zipWithM
    1-384Section 76.1: Calculatings sales prices
    1-385Chapter 77: Profunctor
    1-386Section 77.1: (->) Profunctor
    1-387Chapter 78: Type Application
    1-388Section 78.1: Avoiding type annotations
    1-389Section 78.2: Type applications in other languages
    1-390Section 78.3: Order of parameters
    1-391Section 78.4: Interaction with ambiguous types
    1-392Credits
    1-393You may also like

    FAQ

    您可以透過手機、平板或是電腦登入 HiSKIO 平台,在【我的學習】>【我的書籍】頁面,選擇想看的電子書。

    Recommendations

    Reviews

    | Collecting

    Sales Plans