Skip to content

Instantly share code, notes, and snippets.

enum CurlyBracketsType: String {
case forwards = "{"
case backwards = "}"
private var opposite: String {
switch self {
case .forwards:
return CurlyBracketsType.backwards.rawValue
package com.fotoespiritu.twcurrency;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URISyntaxException;
import java.util.ArrayList;
import org.apache.http.HttpEntity;
import Foundation
class CalculatorBrain
{
private enum Op: Printable
{
case Operand(Double)
case UnaryOperation(String, Double -> Double)
case BinaryOperation(String, (Double, Double) -> Double)