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
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'findmyiphone' | |
| username = ENV.fetch("MOBILEME_USERNAME") | |
| password = ENV.fetch("MOBILEME_PASSWORD") | |
| puts "logging in as: #{username}@me.com" | |
| i = FindMyIphone.new(username, password) |
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
| (* defines the Ast.binding for a function of form: | |
| let fun_name ?(opt_arg1) ?(opt_arg2) final_ident = function_body ... | |
| *) | |
| let function_with_label_args _loc ~fun_name ~final_ident ~function_body ~return_type opt_args = | |
| let opt_args = opt_args @ [ <:patt< $lid:final_ident$ >> ] in | |
| <:binding< $lid:fun_name$ = | |
| $List.fold_right (fun b a -> | |
| <:expr<fun $b$ -> $a$ >> | |
| ) opt_args <:expr< ( $function_body$ : $return_type$ ) >> | |
| $ >> |
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
| (* defines the Ast.binding for a function of form: | |
| let fun_name ?(opt_arg1) ?(opt_arg2) final_ident = function_body ... | |
| XXX: figure out the quotation magic for this, if such exists | |
| *) | |
| let function_with_label_args _loc ~fun_name ~final_ident ~function_body ~return_type opt_args = | |
| let opt_args = opt_args @ [ <:patt< $lid:final_ident$ >> ] in | |
| let rec fn _loc = function | |
| |hd::tl -> | |
| Ast.ExFun(_loc, | |
| Ast.McArr(_loc, |
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
| module Int = struct | |
| type t = int | |
| let compare : int -> int -> int = compare | |
| end | |
| module M = Map.Make(Int) | |
| type +'a elt | |
| type 'a map = 'a elt M.t | |
| let addA (x : 'a) (m : [> `A of 'a] map) = |
NewerOlder