I hereby claim:
- I am tomwadeson on github.
- I am tomwadeson (https://keybase.io/tomwadeson) on keybase.
- I have a public key ASBHtwj-BohXckvgbTfHp9M5a79ZrcLg8_WrLEQS07qrvgo
To claim this, I am signing this object:
| scala> case class Callback[A](f: (A => Unit) => Unit) { | |
| | def map[B](g: A => B): Callback[B] = Callback { (h: B => Unit) => f(a => h(g(a))) } | |
| | def flatMap[B](g: A => Callback[B]): Callback[B] = Callback { (h: B => Unit) => f(a => g(a).f(b => h(b))) } | |
| | } | |
| defined class Callback |
| module HarryPotter where | |
| import qualified Data.Map.Strict as Map | |
| import Data.Maybe (catMaybes) | |
| type Copies = Int | |
| type Discount = Double | |
| type Price = Double | |
| type DiscountScheme = Int -> Discount |
| package com.tomwadeson.show | |
| import com.tomwadeson.Show.Showable | |
| import scala.language.implicitConversions | |
| trait Show[A] { | |
| def show(a: A): String | |
| } |
| module IntermediateHaskellExercises where | |
| class Fluffy f where | |
| furry :: (a -> b) -> f a -> f b | |
| -- Exercise 1 | |
| instance Fluffy [] where | |
| furry :: (a -> b) -> [a] -> [b] | |
| furry _ [] = [] | |
| furry f (x:xs) = f x : furry f xs |
I hereby claim:
To claim this, I am signing this object:
| import cats.effect.{ExitCode, IO, IOApp, Resource} | |
| import org.http4s.HttpRoutes | |
| import org.http4s.client.Client | |
| import org.http4s.client.blaze.BlazeClientBuilder | |
| import org.http4s.dsl.Http4sDsl | |
| import org.http4s.implicits._ | |
| import cats.implicits._ | |
| object Http4sClientTest extends IOApp { |
trait Console[F[_]] {
def readLine: F[String]
def printLine(s: String): F[Unit]
}// I know that all this function can do is call `readLine`.
// What's more, it can only do it exactly (usefully) once.| package foo | |
| import cats.effect.{IO, Resource, Sync} | |
| import cats.effect.concurrent.Ref | |
| import cats.implicits._ | |
| import doobie.util.transactor.Transactor | |
| /** | |
| * The `Foo` domain model. | |
| * |
| package newbeeper.performance | |
| import cats.effect.concurrent.{MVar, Ref} | |
| import cats.effect.syntax.concurrent._ | |
| import cats.effect.{Concurrent, ConcurrentEffect, Sync} | |
| import cats.syntax.flatMap._ | |
| import cats.syntax.functor._ | |
| import fs2.Stream | |
| import org.scalacheck.Arbitrary |
| {-# LANGUAGE DerivingVia #-} | |
| {-# LANGUAGE GeneralisedNewtypeDeriving #-} | |
| module Day1 | |
| ( moduleMasses | |
| , partOne | |
| , partTwo | |
| ) | |
| where |