Par @cyriux & @tpierrain.
Deux axes de symétrie, un axe "API" | "SPI", et un axe "Verify behavior in tests" | "Deliver value to prod".
| module Fibonacci where | |
| fibonacci 1 = 0 | |
| fibonacci 2 = 1 | |
| fibonacci n = fibonacci(n - 1) + fibonacci(n - 2) |
Par @cyriux & @tpierrain.
Deux axes de symétrie, un axe "API" | "SPI", et un axe "Verify behavior in tests" | "Deliver value to prod".
| storage.makeId('dress') | |
| .then(a => storage.makeId('dress').then(b => [a, b])) | |
| .then(([a, b]) => storage.makeId('dress').then(c => [a, b, c])) | |
| .then(([a, b, c]) => { | |
| a.should.be.lessThan(b); | |
| a.should.be.lessThan(c); | |
| b.should.be.lessThan(c); | |
| }) |
| #!/usr/bin/env bash | |
| while [[ $# > 1 ]] | |
| do | |
| key="$1" | |
| case $key in | |
| -c|--code) | |
| CODE="$2" | |
| shift |
| const boom = require('boom') | |
| const productProvider = require('./services/product-provider') | |
| function getProducts(request, reply) { | |
| productProvider.findAll((err, products) => { | |
| if (err) { | |
| return reply(boom.internal("Something happened!", err)) | |
| } | |
| reply(products) |
| \n | |
| time_namelookup: %{time_namelookup}\n | |
| time_connect: %{time_connect}\n | |
| time_appconnect: %{time_appconnect}\n | |
| time_pretransfer: %{time_pretransfer}\n | |
| time_redirect: %{time_redirect}\n | |
| time_starttransfer: %{time_starttransfer}\n | |
| ----------\n | |
| time_total: %{time_total}\n | |
| \n |
| package com.scratch.test; | |
| import org.junit.Test; | |
| import java.text.SimpleDateFormat; | |
| import java.time.Instant; | |
| import java.time.LocalDateTime; | |
| import java.time.ZoneId; | |
| import java.util.Date; | |
| import java.util.TimeZone; |
| {-- Fizzbuzz sur un monoïde ----------------------- | |
| Ensemble : le sous-ensemble de Integerzz des éléments pour lesquels "fizzbuzz" est l'indentité. | |
| Loi de composition interne : la fonction "pluzz". | |
| Élément neutre : ("fizzbuzz", 0) | |
| -----------------------------------------------------------} | |
| import Graphics.Element exposing (..) |