Skip to content

Instantly share code, notes, and snippets.

View hyperrealgopher's full-sized avatar
🏠
Working from home

Hyperreal Gopher hyperrealgopher

🏠
Working from home
View GitHub Profile
@hyperrealgopher
hyperrealgopher / State.hs
Created April 9, 2021 06:34
system-f/fp-course: State.hs
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE RebindableSyntax #-}
module Course.State where
import Course.Core
import qualified Prelude as P
import Course.Optional
@hyperrealgopher
hyperrealgopher / Optional.hs
Created March 27, 2021 07:40
system-f/fp-course: Optional.hs
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Course.Optional where
import qualified Control.Applicative as A
import qualified Control.Monad as M
import Course.Core
import qualified Prelude as P
@hyperrealgopher
hyperrealgopher / Monad.hs
Created March 27, 2021 07:40
system-f/fp-course: Monad.hs
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE RebindableSyntax #-}
module Course.Monad where
import Course.Applicative
import Course.Core
import Course.ExactlyOne
@hyperrealgopher
hyperrealgopher / List.hs
Created March 27, 2021 07:39
system-f/fp-course: List.hs
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleInstances #-}
-- + Complete the 10 exercises below by filling out the function bodies.
-- Replace the function bodies (error "todo: ...") with an appropriate
-- solution.
-- + These exercises may be done in any order, however:
-- Exercises are generally increasing in difficulty, though some people may find later exercise easier.
@hyperrealgopher
hyperrealgopher / Functor.hs
Created March 27, 2021 07:38
system-f/fp-course: Functor.hs
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE InstanceSigs #-}
module Course.Functor where
import Course.Core
import Course.ExactlyOne
import Course.Optional
import Course.List
@hyperrealgopher
hyperrealgopher / FileIO.hs
Created March 27, 2021 07:35
system-f/fp-course: FileIO.hs
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RebindableSyntax #-}
module Course.FileIO where
import Course.Core
import Course.Applicative
import Course.Monad
@hyperrealgopher
hyperrealgopher / Applicative.hs
Created March 27, 2021 07:33
system-f/fp-course: Applicative
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE RebindableSyntax #-}
module Course.Applicative where
import Course.Core
import Course.ExactlyOne
import Course.Functor