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
my $acc = sum(map { calc($_, $settings, $self) } @desc); |
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
// To compile: fsc -r ~/workplace/repos/suave/Suave/Suave.dll simplesuave.fs | |
// To run: MONO_PATH=$MONO_PATH:/Users/dc/workplace/repos/suave/Suave mono simplesuave.exe | |
open Suave.Web | |
open Suave.Combinator | |
choose [ url "/hello" >>= ok ("Hello World" |> cnst); ] | |
|> web_server [|HTTP, "127.0.0.1",8080|] | |
|> Async.RunSynchronously | |
|> ignore ;; |
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
/** | |
* On my mac, compile single file like this: | |
* clang -DUSEMAIN bit_vector.c | |
* gcc -DUSEMAIN bit_vector.c | |
* | |
* TODO: Run this through valgrind. I don't think I'm leaking memory | |
* TODO: This implementation could probably do more error checking. It | |
* does'nt validate the values being passed in. | |
*/ | |
#include <stdio.h> |
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
#ifndef _BIT_VECTOR_H | |
#define _BIT_VECTOR_H | |
typedef struct bit_vector { | |
// Bits for the bit vector | |
unsigned char* bits; | |
// Number of bits in the vector | |
unsigned int size; | |
} bit_vector_t; |
OlderNewer