This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from http import createServer, response, * as http | |
from IO import IO, * as io | |
hostname = '127.0.0.1' | |
port = 3000 | |
export main: IO<Unit> = do { | |
server <- createServer((req) -> response.do { | |
response.writeHead(200, { 'Content-Type': 'text/plain' }) | |
response.end('Hello World\n') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as O from 'fp-ts/Option' | |
import * as IO from 'fp-ts/IO' | |
import * as T from 'fp-ts/Task' | |
import * as A from 'fp-ts/Array' | |
import { HKT, Kind, URIS } from 'fp-ts/HKT' | |
import { Monad, Monad1 } from 'fp-ts/Monad' | |
import { pipe } from 'fp-ts/function' | |
const _: any = function* (x: any): any { | |
return yield x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
import Prelude | |
import Data.Functor.Mu (Mu(..)) | |
import Effect (Effect) | |
import Effect.Console (log) | |
import Matryoshka (class Recursive, Algebra, cata) | |
data ListF a b |