This is my recommended path for learning Haskell.
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
import kotlin.reflect.full.declaredMemberProperties | |
import kotlin.reflect.full.primaryConstructor | |
/** | |
* Merge two data classes | |
* The resulting data class will contain | |
* - all fields of `other` which are non null | |
* - the fields of `this` for the fields which are null in `other` | |
*/ | |
infix inline fun <reified T : Any> T.merge(other: T): T { |
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
{-# OPTIONS -Wall #-} | |
module Main where | |
import Control.Concurrent (threadDelay) | |
import System.Environment (getArgs) | |
import System.INotify | |
main :: IO () | |
main = do |
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
// Package readyset provides a simple set implementation. | |
package readyset | |
import "fmt" | |
// Set is a container for arbitrary data which ensures that duplicates elements will not be stored multiple times. | |
type Set map[interface{}]struct{} | |
// NewSet creates a new Set containing the given elements. | |
func NewSet(in ...interface{}) Set { |
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
(ns ufold.core) | |
(use 'lamina.core 'aleph.tcp 'gloss.core) | |
(require 'gloss.io) | |
(use 'protobuf) | |
(defprotobuf Msg Ufold$Msg) | |
(defn dump-bytes [bytes] | |
(prn (seq bytes))) |
NOTE: This documentation has been put here because I couldn't find it anywhere else. I am not associated with Crunchbase in any way. I cannot help you with your Crunchbase API problems. If you need help try here: https://groups.google.com/forum/#!forum/crunchbase-api
The CrunchBase API provides JSON representations of the data found on CrunchBase. The API currently supports three actions: "show", "search", and "list", which are each described below.
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <assert.h> | |
#include <time.h> | |
#include <stdbool.h> | |
#include <ev.h> | |
#include <evcom.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
var sys = require('sys'), | |
times = 500000 | |
function bm(label, fn) { | |
var start = +new Date | |
fn() | |
sys.puts(' ' + label + ' : ' + (+new Date - start) + ' ms') | |
}; |