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
let f (x0 : int[]) (x1 : int[]) = | |
let x2 = ref 0 | |
let x3 = ref true | |
let x4 = ref false | |
let x5 = ref 0 | |
let x6 = ref 0 | |
let x7 = ref true | |
let x8 = ref true | |
let x9 = ref 0 | |
let x10 = ref 0 |
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
let f (x0 : int []) = | |
let x1 = ref 0 | |
let x2 = ref true | |
let x3 = ref false | |
let x4 = ref 0 | |
let x5 = ref 0 | |
let x6 = ref true | |
let x7 = ref true | |
let x8 = ref 0 | |
let x9 = ref 0 |
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
public interface IBoolExpr { } | |
public class And : IBoolExpr | |
{ | |
public IBoolExpr Left { get; set; } | |
public IBoolExpr Right { get; set; } | |
public void Deconstruct(out IBoolExpr left, out IBoolExpr right) | |
{ | |
left = Left; | |
right = Right; | |
} |
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
public class Subs : ExpressionVisitor | |
{ | |
private Dictionary<ParameterExpression, Expression> env; | |
public Subs(Dictionary<ParameterExpression, Expression> env) | |
{ | |
this.env = env; | |
} | |
protected override Expression VisitParameter(ParameterExpression node) | |
{ |
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
class Program | |
{ | |
class Node | |
{ | |
public int Id; | |
public Node Parent; | |
} | |
class TreeNode | |
{ |
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
using System; | |
public class C { | |
public void M() { | |
Func<Func<dynamic, dynamic>, dynamic> fd = x => x; | |
dynamic Y = fd(f => fd(x => f(fd(y => x(x)(y))))(fd(x => f(fd(y => x(x)(y)))))); | |
Y(fd(f => fd(x => f(x))))(42); | |
} | |
} |
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
#time | |
[<Struct>] | |
type ResultStruct<'T, 'TError> = | |
| OkS of ok : 'T | |
| ErrorS of error : 'TError | |
type ResultClass<'T, 'TError> = | |
| OkC of ok : 'T | |
| ErrorC of error : 'TError |
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 test where | |
import prelude | |
import univalence | |
data list (A : U) = nil | cons (x : A) (xs : list A) | |
data bool = false | true | |
data nat = zero | suc (n : nat) | |
one : nat = suc zero |
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
extern crate time; | |
use std::io; | |
use time::PreciseTime; | |
fn main() { | |
let mut guess: String = String::new(); | |
io::stdin().read_line(&mut guess).expect("failed to read line"); | |
let n: i64 = guess.trim().parse().expect("Please type a number!"); |
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
(require '[clojure.core.match :refer [match]]) | |
(defn extend [k v l] | |
(fn [k'] | |
(if (= k k') v (l k')))) | |
(def empty (fn [k'] (throw (Exception. "oups")))) | |
(defn eval [e env] |