Skip to content

Instantly share code, notes, and snippets.

@dlants
dlants / generic-deriving.purs
Last active April 19, 2021 15:54
Generic deriving with purescript
-- an example of how to derive a show instance for a Maybe type
-- not totally sure why `derive instance showMyMaybe :: (Show a) => Show (MyMaybe a)` errors with...
-- error: CannotDerive :
-- Cannot derive a type class instance for Data.Show.Show (MyMaybe a) since instances of this type class are not derivable.
module Main where
import Prelude
import Control.Monad.Eff (Eff)
import Control.Monad.Eff.Console (CONSOLE, log)
@pokk
pokk / README.md
Last active November 9, 2020 11:14
Kotlin stdlib "let", "run", "apply", "also", "use", "with"

[TOC]

Introduction

There are very good five stdlib operates we can use.

  1. let
  2. run
  3. apply
  4. also