Skip to content

Instantly share code, notes, and snippets.

View nwaywood's full-sized avatar

Nick Waywood nwaywood

  • Melbourne, AU
View GitHub Profile
@nwaywood
nwaywood / haskell_concurrency_state.md
Last active February 12, 2020 02:49
Concurrency and State in Haskell

TLDR: I am trying to implement the equivalent of this handler struct in Haskell, which involves mutable variables and concurrency and I'm not sure how to go about implementing it

Question

I need to implement the equivalent of this Golang handler in Haskell:

// Handler handler implementation for shim side of chaincode.
type Handler struct {
	// serialLock is used to prevent concurrent calls to Send on the
@nwaywood
nwaywood / bash-menu.sh
Created March 15, 2017 03:47
Template structure for a bash script with simple menu and command line args
#! /bin/bash
# ===================
# Script funtionality
# ===================
# do something
doSomething() {
echo 'doing something'
}