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
open System | |
let ratio = (1.0 + Math.Sqrt(5.0)) / 2.0 | |
let inputInt (prompt: String) = | |
Console.WriteLine(prompt) | |
int (Console.ReadLine()) | |
let inputFloat (prompt: String) = | |
Console.WriteLine(prompt) |
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
open System | |
open System.IO | |
let gravity = 9.81 | |
let angleOfReach speed distance = 0.5 * Math.Asin((gravity * distance) / Math.Pow(speed, 2.0)) | |
let distanceTravelled speed angle = Math.Pow(speed, 2.0) * Math.Sin(2.0 * angle) / gravity | |
let angle x y = Math.Atan(y / x) |
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
; util | |
(defn tag-dispatch [dispatch tag] | |
(fn [msg] | |
(let [tagged (if (vector? tag) | |
(conj tag msg) | |
[tag msg])] | |
(dispatch tagged)))) | |
; counter |
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
(def react-sortable-hoc (aget js/window "deps" "react-sortable-hoc")) | |
(defn make-sortable-element-component [wrapped-component] | |
(let [sortable-element-factory (.-SortableElement react-sortable-hoc)] | |
(-> wrapped-component | |
r/reactify-component | |
sortable-element-factory | |
r/adapt-react-class))) | |
(defn make-sortable-container-component [wrapped-component] |
OlderNewer