Skip to content

Instantly share code, notes, and snippets.

View yonatan-reicher's full-sized avatar
🦆

Yonatan Reicher yonatan-reicher

🦆
View GitHub Profile
@yonatan-reicher
yonatan-reicher / interfaces_example.c
Created April 26, 2022 08:26
A short example of making interfaces(traits) in C for polymorphism
#include <stdio.h>
#include <stdlib.h>
/* A trait for things that can be printed */
typedef struct Display Display;
typedef struct DisplayVTable {
void (*display)(Display, FILE*);
} DisplayVTable;
@yonatan-reicher
yonatan-reicher / fable-repl.fs
Created August 21, 2021 08:10
Created with Fable REPL
open Fable
open Browser
open Browser.Dom
type [<Struct>] OneToNine =
| One | Two | Three | Four | Five | Six | Seven | Eight | Nine
module OneToNine =
let all = set [
One; Two; Three; Four; Five; Six; Seven; Eight; Nine
@yonatan-reicher
yonatan-reicher / fable-repl.fs
Created August 21, 2021 08:10
Created with Fable REPL
open Fable
open Browser
open Browser.Dom
type [<Struct>] OneToNine =
| One | Two | Three | Four | Five | Six | Seven | Eight | Nine
module OneToNine =
let all = set [
One; Two; Three; Four; Five; Six; Seven; Eight; Nine
@yonatan-reicher
yonatan-reicher / fable-repl.fs
Created August 21, 2021 07:48
Created with Fable REPL
open Fable
open Browser
open Browser.Dom
type [<Struct>] OneToNine =
| One | Two | Three | Four | Five | Six | Seven | Eight | Nine
module OneToNine =
let all = set [
One; Two; Three; Four; Five; Six; Seven; Eight; Nine
@yonatan-reicher
yonatan-reicher / fable-repl.fs
Created August 21, 2021 07:48
Created with Fable REPL
open Fable
open Browser
open Browser.Dom
type [<Struct>] OneToNine =
| One | Two | Three | Four | Five | Six | Seven | Eight | Nine
module OneToNine =
let all = set [
One; Two; Three; Four; Five; Six; Seven; Eight; Nine
@yonatan-reicher
yonatan-reicher / fable-repl.fs
Created August 21, 2021 07:48
Created with Fable REPL
open Fable
open Browser
open Browser.Dom
type [<Struct>] OneToNine =
| One | Two | Three | Four | Five | Six | Seven | Eight | Nine
module OneToNine =
let all = set [
One; Two; Three; Four; Five; Six; Seven; Eight; Nine
@yonatan-reicher
yonatan-reicher / fable-repl.fs
Created August 21, 2021 07:48
Created with Fable REPL
open Fable
open Browser
open Browser.Dom
type [<Struct>] OneToNine =
| One | Two | Three | Four | Five | Six | Seven | Eight | Nine
module OneToNine =
let all = set [
One; Two; Three; Four; Five; Six; Seven; Eight; Nine
@yonatan-reicher
yonatan-reicher / fable-repl.fs
Created August 21, 2021 07:47
Created with Fable REPL
open Fable
open Browser
open Browser.Dom
type [<Struct>] OneToNine =
| One | Two | Three | Four | Five | Six | Seven | Eight | Nine
module OneToNine =
let all = set [
One; Two; Three; Four; Five; Six; Seven; Eight; Nine
@yonatan-reicher
yonatan-reicher / fable-repl.fs
Created August 21, 2021 07:30
Created with Fable REPL
open Fable
open Browser
open Browser.Dom
type [<Struct>] OneToNine =
| One | Two | Three | Four | Five | Six | Seven | Eight | Nine
module OneToNine =
let all = set [
One; Two; Three; Four; Five; Six; Seven; Eight; Nine
@yonatan-reicher
yonatan-reicher / fable-repl.fs
Created August 21, 2021 07:30
Created with Fable REPL
open Fable
open Browser
open Browser.Dom
type [<Struct>] OneToNine =
| One | Two | Three | Four | Five | Six | Seven | Eight | Nine
module OneToNine =
let all = set [
One; Two; Three; Four; Five; Six; Seven; Eight; Nine