I hereby claim:
- I am poetix on github.
- I am poetix (https://keybase.io/poetix) on keybase.
- I have a public key ASDdtm9fCHu0-fJArrQzHByuiG-rDxBbi1TeELZ3YLElBwo
To claim this, I am signing this object:
package com.codepoetics.hume; | |
import static org.hamcrest.MatcherAssert.assertThat; | |
import static org.hamcrest.Matchers.equalTo; | |
import org.junit.Test; | |
import com.codepoetics.hume.api.Property; | |
import com.codepoetics.hume.api.Record; | |
import com.codepoetics.spinoza.Compose; |
import qualified Data.Map as Map | |
type SubPaths = Map.Map String Node | |
data Node = Content SubPaths | NoContent SubPaths deriving (Show) | |
content :: [(String, Node)] -> Node | |
content kvs = Content $ Map.fromList kvs | |
nocontent :: [(String, Node)] -> Node | |
nocontent kvs = NoContent $ Map.fromList kvs |
package com.codepoetics.kontinuous | |
import java.sql.Connection | |
import java.sql.PreparedStatement | |
import java.sql.ResultSet | |
data class Foo(val a: String, val b: Int, val c: Double) | |
interface RowN { | |
val selectSql: String |
module Main where | |
import Prelude | |
import Control.Plus (empty) | |
import Data.Array as A | |
import Data.Set as S | |
import Control.Monad.Eff.Console (log) | |
import Data.Foldable (minimum, maximum) | |
import Data.Maybe (fromMaybe) | |
import Data.String (joinWith, fromCharArray) |
I hereby claim:
To claim this, I am signing this object:
import { expect } from 'chai'; | |
import 'mocha'; | |
class HelloEndpoint { | |
constructor(private service: HelloService) {} | |
async handle(evt: any): Promise<any> { | |
const greeting = await this.service.sayHello(evt.queryStringParameters.name); | |
return { | |
statusCode: 200, |
import { expect } from 'chai'; | |
import 'mocha'; | |
class HelloEndpoint { | |
constructor(private service: HelloService) {} | |
async handle(evt: any): Promise<any> { | |
const greeting = await this.service.sayHello(evt.queryStringParameters.name); | |
return { | |
body: greeting |
import { expect } from 'chai'; | |
import 'mocha'; | |
import { mock, instance, when, anyString, verify } from "ts-mockito"; | |
class HelloEndpoint { | |
constructor(private service: HelloService) {} | |
async handle(evt: any): Promise<any> { | |
const greeting = await this.service.sayHello(evt.queryStringParameters.name); | |
return { |
module Main | |
forLoop : List a -> (a -> IO ()) -> IO () | |
forLoop [] f = return () | |
forLoop (x :: xs) f = do f x | |
forLoop xs f | |
syntax for {x} "in" [xs] ":" [body] = forLoop xs (\x => body) | |
spaces : Nat -> String |
public final class Person { | |
// Publicly accessible, all parameters validated. | |
public static Person with(String name, int age, String favouriteColour) { | |
checkArgument(age > 0, "age must be greater than 0"); | |
return new Person( | |
checkNotNull(name, "name must not be null"), | |
age, | |
checkNotNull(favouriteColour, "favouriteColour must not be null") |