Skip to content

Instantly share code, notes, and snippets.

View ShalokShalom's full-sized avatar
🐉
Garuda

ShalokShalom ShalokShalom

🐉
Garuda
View GitHub Profile
--Rich Hickey's infamous transducers, demonstrating reversed function composition.
--Look closely.
function transduce(tf, rf, init, iter)
for i in iter do
init = tf(rf)(init, i)
end
return init
end
@ShalokShalom
ShalokShalom / multi_methods.rb
Created January 2, 2025 09:22 — forked from unworthyEnzyme/multi_methods.rb
Multi-methods/multiple dispatch implemented in ruby
class Type
attr_accessor :name
attr_accessor :supertype
def initialize(name, supertype = nil)
@name = name
@supertype = supertype
end
def is?(type)
@ShalokShalom
ShalokShalom / GODOT-LANG-SUPPORT.md
Created August 24, 2020 08:11
Godot Languages Support: A community-maintained gist of languages with bindings for Godot Engine.

Godot Languages Support

A community-maintained gist.

Categories

(TODO)

(Per-module support feature legend. Currently, Rust (IIRC) doesn't support the video encoding module.)

By feature

@ShalokShalom
ShalokShalom / compabilitylistforhaskell.md
Last active March 7, 2018 12:26 — forked from gusty/fsharpplus_haskell_compatibility.md
Haskell operator compatibility layer for F-Sharp
+----------------------+--------------------+--------------------+--------------------+
|      Operation       |      F-Sharp       |     Compability    |      Haskell       |
+======================+====================+====================+====================+
| List.append          |         @          |                    |        ++          |
+----------------------+--------------------+--------------------+--------------------+
| Function composition |       f << g       |       f . (g)      |       f . g        |
+----------------------+--------------------+--------------------+--------------------+
|                      |         =          |        ==          |        ==          |
+----------------------+--------------------+--------------------+--------------------+