Skip to content

Instantly share code, notes, and snippets.

View wcalderipe's full-sized avatar

William Calderipe wcalderipe

View GitHub Profile
@wcalderipe
wcalderipe / README.md
Last active November 27, 2022 15:15
A gist about what are the solution faces of controlling flow in side-effectful function pipelines.

Control flow in Clojure

A gist containing a problem example and different implementations based on what is being discussed at How are clojurians handling control flow on their projects?.

Feel free to leave a comment and feedback is welcome 😃

Examples in this Gist

  • Bult-in exceptions in a thread macro
  • didibus' trylet macro
@wcalderipe
wcalderipe / FIX.md
Last active January 25, 2019 02:26
Fix Jest watch mode in Linux
@wcalderipe
wcalderipe / logger.md
Last active January 10, 2019 00:17
Logger

Logger

Interface suggestion

import { logger, Level } from 'booking-flow-logger'

logger({
  level: Level.INFO,
 tracking: {
const addOne = (value) => value + 1
addOne(addOne(1)) // 3
let value = 1
const addOne = () => value + 1
addOne() // 2
addOne() // 3
const flightBuilder = () => {
let flight = {}
const builder = {
withFlightCode: (flightCode) => {
flight.flightCode = flightCode
return builder
},
withStops: (stops) => {
{
"books": [
{
"title": "Some awesome book in the internet",
"author": "John Doe",
"cover": "http://placehold.it/158x200"
},
{
"title": "Some awesome book in the internet",
"author": "John Doe",
const createTimeoutPromise = (time) => new Promise((resolve) => {
setTimeout(() => {
console.log(`resolved after ${time} secs`)
resolve(time)
}, time)
})
console.log('creating promises')
const promiseB = createTimeoutPromise(2000)
const promiseC = createTimeoutPromise(3000)
@wcalderipe
wcalderipe / 01.html
Last active October 20, 2015 22:21
minicurso-angularjs_introdução
<!DOCTYPE html>
<html>
<head>
<title>Minicurso de AngularJS</title>
</head>
<body>
<script src="scripts/angular.js"></script>
</body>
</html>