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
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Editor</title> | |
<script src="bower_components/webcomponentsjs/webcomponents.min.js"></script> | |
<link rel="import" href="elements/user-gravatar.html" /> | |
</head> | |
<body> | |
<user-gravatar email="[email protected]"/> |
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
x="" | |
b=r=>`${c||"No more"} bottle${c-1?"s":""} of beer${r&&c--||" on the wall"} | |
` | |
for(c=99;c;)x+=b()+b(1)+`Take one down, pass it around | |
`+b() |
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
// these series of types define the api of the app | |
type Command = | |
| Add of CreateNewTodo | |
| Clear | |
| Delete of Guid | |
| Update of Guid * PatchTodo | |
} | |
and Query = | |
| Get of Guid |
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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace ConsoleApplication2 | |
{ | |
class Program | |
{ |
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
(** | |
### Evaluation demo | |
The following is a simple calculation: *) | |
let test = 40 + 2 | |
(** We can print it as follows: *) | |
(*** define-output:test ***) | |
printf "Result is: %d" test | |
(** The result of the previous snippet is: *) |
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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
namespace Pauwels.AspNet.Controllers | |
{ | |
public abstract class FList<T> { | |
public abstract FList<T> Tail(); | |
public abstract T Head(); |
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.IO | |
let oldpath = @"D:\dev\oldblog\source\_posts" | |
let newpath = @"D:\dev\blog\tojans.me\content\blog" | |
let migrate (fname:string) = | |
let (date,name) = fname.Substring(0,10),fname.Substring(11).ToLower() | |
let slug = name.Substring(0,name.Length - ".markdown".Length).ToLower() | |
let isNonDateLine (x:string) = x.StartsWith("date:") = false | |
let isNonAddThisLine (x:string) = |
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
// Data Nat = Z | S Nat | |
// | |
// plus : Nat -> Nat -> Nat | |
// plus Z y = y | |
// plus (S k) y = S (plus k y) | |
abstract class Nat { | |
} | |
class Zero : Nat { |
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 Math | |
type Matrix = | |
| Matrix of decimal [,] | |
static member create l = Matrix l | |
member this.elements = | |
match this with | |
| Matrix l -> l | |
member this.rowcount = this.elements |> Array2D.length1 |
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
%default total | |
||| First pins down range is limited from 0 to 9 or a `Strike` | |
data FirstThrow = FirstPinsDown (Fin 10) | Strike | |
-- ||| Second pins down range should be limited by FirstThrowPinsdown count - 9 or a `Spare` | |
-- ||| This currently isn't; up next: figuring out how to do this; ignore the Spare for now! | |
-- data SecondThrow = Second FirstThrowPinsDown | Spare | |
data SecondThrow = SecondPinsDown (Fin 10) | Spare |