MARK P. JONES
Pacific Software Research Center
Department of Computer Science and Engineering
Oregon Graduate Institute of Science and Technology
function wordToLtrsArr(w){return w.split('')} | |
function tail(arr){return arr.slice(1)} | |
function goTo(o,wp){ | |
if(!wp.length){return o} | |
var firstLetter = wp[0]; | |
var point = o[firstLetter]; | |
-- Show loaded modules in window title and use a green "λ>" as prompt. | |
-- Subsequent lines of multi-line commands shall begin with " |". | |
:set prompt "\SOH\ESC]0;GHCi: %s\BEL\ESC[32;1m\STXλ>\SOH\ESC[0m\STX " | |
:set prompt2 "\SOH\ESC[32;1m\STX |\SOH\ESC[0m\STX " | |
-- Paste and evaluate text from the OS X clipboard. (The pasted text also | |
-- prints in yellow unless pasting quietly using :paste-quiet.) | |
:set -package process | |
:def paste \_ -> do { paste <- System.Process.readProcess "pbpaste" [] ""; let cmd = if '\n' `elem` paste then ":{\ntype Ö = ()\n" ++ paste ++ "\n:}" else paste in putStrLn ("\SOH\ESC[33m\STX" ++ paste ++ "\SOH\ESC[0m\STX") >> return (":cmd return " ++ show cmd) } | |
:def paste-quiet \_ -> do { paste <- System.Process.readProcess "pbpaste" [] ""; let cmd = if '\n' `elem` paste then ":{\ntype Ö = ()\n" ++ paste ++ "\n:}" else paste in return (":cmd return " ++ show cmd) } |
#include <stdlib.h> | |
#include <string.h> | |
#include <assert.h> | |
#include "list.h" | |
void list_new(list *list, int elementSize, freeFunction freeFn) | |
{ | |
assert(elementSize > 0); | |
list->logicalLength = 0; |