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
(* | |
OCaml translation of the ideas explained in http://fumieval.hatenablog.com/entry/2014/09/22/144401 | |
To emulate the higher kinded polymorphism, the technique used explained in https://ocamllabs.github.io/higher/lightweight-higher-kinded-polymorphism.pdf | |
*) | |
module StateMonad = struct | |
type ('s, 'a) m = 's -> 's * 'a |
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
(* OCaml version | |
compile with: | |
ocamlopt str.cmxa -o classifyDigits classifyDigits.ml | |
*) | |
(* | |
// This F# dojo is directly inspired by the | |
// Digit Recognizer competition from Kaggle.com: | |
// http://www.kaggle.com/c/digit-recognizer | |
// The datasets below are simply shorter versions of |
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
let () = | |
prerr_endline @@ GMain.Main.init (); | |
let window = GWindow.window ~title: "liv" ~allow_shrink: true ~allow_grow: true () in | |
window#show (); | |
window#event#add [`SCROLL]; | |
ignore @@ window#event#connect#scroll ~callback:(fun ev -> | |
Printf.eprintf "at +%.0f+%.0f %s\n%!" | |
(GdkEvent.Scroll.x ev) | |
(GdkEvent.Scroll.y ev) |
NewerOlder