Skip to content

Instantly share code, notes, and snippets.

open System;
exception ParseError of string
(* A token represent a single element of the parse tree *)
type Token =
| EOFToken
| NumberToken of double
| IdentifierToken of string
| OperatorToken of char
@cthom06
cthom06 / Skim.fs
Last active December 15, 2015 23:49
module Skim.Main
open System
open System.IO
open System.Linq
type Sexp =
| Atom of Value
| List of Sexp list
and Value =
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication8
{
class Program
{
@cthom06
cthom06 / gist:5501614
Last active December 16, 2015 21:39
Playing with laziness in f#
module LazyStuff.Main
open System
(* I dont know if this is actually fast *)
type FastLazy<'a> = {
mutable Value : 'a option;
Func : unit -> 'a;
}
with
@cthom06
cthom06 / test.cs
Last active December 30, 2015 05:09
array example
using System;
namespace Foo
{
class Program
{
public static void Main(string[] args)
{
const int TestSize = 1000000;