Skip to content

Instantly share code, notes, and snippets.

Avatar

João Pedro Abreu de Souza petrolifero

View GitHub Profile
View AVL
SeqFromAVL(avl)
{
if (empty(avl))
{
return []
}
else
{
left = SeqFromAVL(avl->left)
right = SeqFromAVL(avl->right)
@petrolifero
petrolifero / Jenkinsfile
Created Jun 12, 2019
jenkins declarative pipeline strange behaviour
View Jenkinsfile
pipeline
{
agent any;
parameters
{
choice(name: 'resolution', choices: ['a', 'b'], description: '')
booleanParam(name: 'debug', defaultValue: true, description: '')
}
stages
{
@petrolifero
petrolifero / gist:c31afb351b92193e7c478560985dbeed
Created Apr 11, 2019 — forked from seckcoder/gist:9204855
implementation of exception, generator and coroutine based on continuation
View gist:c31afb351b92193e7c478560985dbeed
#lang racket
; Implementations and examples are inspired by Matt Might's blog posts:
; http://matt.might.net/articles/programming-with-continuations--exceptions-backtracking-search-threads-generators-coroutines/
; Note I didn't just copy the code. I implemented it independently, so it looks a lot different from Matt's code.
(define (current-continuation)
(call/cc (lambda (k)
(k k))))
(define (exception)
You can’t perform that action at this time.