Skip to content

Instantly share code, notes, and snippets.

View janhohenheim's full-sized avatar
🌱
Doing business

Jan Hohenheim janhohenheim

🌱
Doing business
View GitHub Profile
type CartItem = string
type EmptyState = NoItems
type PaidForState = { PaidItems : CartItem list;
Payment : decimal}
type ActiveState = { UnpaidItems : CartItem list; }
type Cart =
| Empty of EmptyState
| Active of ActiveState
| PaidFor of PaidForState
// g++ test.cpp --std=c++11 -lpthread -O2
//#ifdef WIN32 <- stdafx breaks this ifdef...
//#include "stdafx.h"
//#endif
#include <iostream>
#include <atomic>
#include <thread>
#include <vector>