This file contains hidden or 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
const std = @import("std"); | |
const Allocator = std.mem.Allocator; | |
const c = @cImport({ | |
@cInclude("./gl_core_3_3.h"); | |
@cInclude("SDL2/SDL.h"); | |
@cInclude("SDL2/SDL_opengl.h"); | |
}); | |
const SDLError = error{ | |
FailedInit, |
This file contains hidden or 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
export default class Fold<A, B> { | |
private constructor( | |
private readonly state: any, | |
private readonly step: (x: A, st: any) => any, | |
private readonly done: (st: any) => B | |
) {} | |
public static of<A, B, S>( | |
state: S, | |
step: (x: A, st: S) => S, |
OlderNewer