Iterate simple b-tree
3 people like thisPosted: 11 years ago by devshorts
This is a modification of the flood fill algorithm to find the largest contiguous block of items in a 2D array. Also includes a simple flood fill finder given a canvas and the target point
2 people like thisPosted: 11 years ago by devshorts
This uses fparsec to parse locale files of hte form Id = text {arg:type} = newline = newlne For use with localization.
1 people like thisPosted: 11 years ago by devshorts
Converts a byte list to a bit list. Takes a list of bytes and transforms it all into a flattened array of bits. For example, > bytesToBits [|byte(0x0F);byte(0xF0)|] 16 ;; val it : byte [] = [|0uy; 0uy; 0uy; 0uy; 1uy; 1uy; 1uy; 1uy; 1uy; 1uy; 1uy; 1uy; 0uy; 0uy; 0uy; 0uy|]
0 people like thisPosted: 11 years ago by devshorts
Prints a list in a spiral
3 people like thisPosted: 10 years ago by devshorts
This module extracts all the blocks out of an html page's header. This can be useful if you are writing tools to merge all the js for future minifaction, or for otherwise manipulating the files.
0 people like thisPosted: 3 years ago by devshorts
Simple binary search of an array. Tests the array at the middle and divides the search space by half each time it looks for the target item. Returns the target item and how many iterations it took to get there
3 people like thisPosted: 11 years ago by devshorts
Tests if a string is a palindrome (whitespace independent)
1 people like thisPosted: 11 years ago by devshorts
Generate a random expression and evaluate it
1 people like thisPosted: 11 years ago by devshorts
Fold a string with one delimiter except for the last with a different delim. So basically if you have a list ["1";"2";"3"] and you want it to be ["1";",";"2";"and";"3]
1 people like thisPosted: 11 years ago by devshorts
Parsers a minimal expression tree allowing for functions of the form "func(arg1,arg2,...)->{body}"
5 people like thisPosted: 7 years ago by devshorts