Skip to content

Instantly share code, notes, and snippets.


Lukasz Klekot lukaszklekot

Block or report user

Report or block lukaszklekot

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Reader.swift
struct Reader<E, A> {
let run: (E) -> A
func map<B>(
_ t: @escaping (A) -> B
) -> Reader<E, B> {
diMap({ $0 }, t)
// .init { e in t( }
lukaszklekot / Contents.swift
Last active Jul 26, 2019
Fooling around with SwiftUI and The Elm Architecture
View Contents.swift
import Combine
import SwiftUI
final class Store<Model, Message>: BindableObject {
private(set) var model: Model {
willSet { willChange.send() }
let update: (inout Model, Message) -> Command<Message>?
let willChange = PassthroughSubject<Void, Never>()
lukaszklekot / main.c
Created Nov 23, 2018
A crude C version of the "Composing state transformations from a list of simple functions" pattern;
View main.c
#include <stdio.h>
double add_ten(double x) {
return x + 10;
double multiply_ten(double x) {
return x * 10;
You can’t perform that action at this time.