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
;; Okasaki's red-black insert in guile scheme | |
;; https://www.cs.tufts.edu/comp/150FP/archive/chris-okasaki/redblack99.pdf | |
(use-modules (ice-9 match) ;; pattern matching | |
(srfi srfi-1) ;; functional procedures | |
(srfi srfi-9) ;; records | |
(srfi srfi-9 gnu)) ;; record extensions | |
(define-immutable-record-type <rb-node> | |
(make-rb-node color value left right) |
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
(ns async-iterators | |
"Functions and procedures for using JavaScript `AsyncIterable`s with | |
`core.async`. Find out more about async iteration at | |
https://github.com/tc39/proposal-async-iteration and | |
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of | |
Kudos to @paul931224 on clojurians for trying this out w/me." | |
(:require [cljs.core.async :as async :refer [go >! close!]])) | |
(defn get-iterator | |
"Create an async iterator object from `iterable`. `iterable` must have a method |
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
#pragma once | |
#include <utility> | |
#include <array> | |
namespace ext { | |
/* Generate a compile-time sequence of Integers from Start to End | |
* | |
* typename IntegralType : the type of the sequence | |
* End: end of the sequence | |
* Start(0): beginning of the sequence |