Code Monkey home page Code Monkey logo

lambda's Introduction

  88                               88                   88             
  88                               88                   88             
  88                               88                   88             
  88 ,adPPYYba, 88,dPYba,,adPYba,  88,dPPYba,   ,adPPYb,88 ,adPPYYba,  
  88 ""     `Y8 88P'   "88"    "8a 88P'    "8a a8"    `Y88 ""     `Y8  
  88 ,adPPPPP88 88      88      88 88       d8 8b       88 ,adPPPPP88  
  88 88,    ,88 88      88      88 88b,   ,a8" "8a,   ,d88 88,    ,88  
  88 `"8bbdP"Y8 88      88      88 8Y"Ybbd8"'   `"8bbdP"Y8 `"8bbdP"Y8

My journey through Haskell and functional programming.

Resources:

Content

1. Haskell Basic Interactive Commands:

  • ghci: starts haskell in interactive mode
  • :l myscript: loads myscript.hs from the dir in which ghci was called.
  • :r: reloads the current script
  • :set prompt "prompt> ": sets prompt> as prompt

2. Starting Out with Haskell

Covered in this section:

  • Basic operators
  • Top level declarations
  • Simple Arithmetic
  • Comments
  • Basic function declarations
  • Basic boolean algebra
  • Names

See content/2.starting_out.hs

3. Lists and more lists...

Covered in this section:

  • Basic list declarations
  • Common list operations

See: content/3.starting_lists.hs and content/4.common_list_operations.hs

4. Lists Comprehension

A list can also be created/described by its mathematical set notation:

alt text

In order to study this notation we need to break it down into its parts:

  • The part before the pipe | is called the output function and it's something that would be applied to every element in the list. Notice that x is the variable here.

  • The first part after the pipe is called the input set, and is a bigger set from which we're going to derive a new set.

  • The part after the comma , is called a predicate, and is the filtering to be applied to the input set in order to obtain the elements we want.

See content/5.list_comprehension.hs for in-depth examples of this.

lambda's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.