Skip to content

Instantly share code, notes, and snippets.

@wnadurski
wnadurski / gist:8a6350f7dd6b1023df539b4fbf0079aa
Created November 5, 2023 11:52
Pure functional language concept supporting type-level programming
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')
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
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