This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Data.List | |
import Data.Vect | |
total | |
repeatAndRet : (n : Nat) -> Type -> Type -> Type | |
repeatAndRet Z argType resultType = resultType | |
repeatAndRet (S n) argType resultType = argType -> repeatAndRet n argType resultType | |
total | |
nary : Nat -> Type-> Type |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defpackage :anonymous-generic-function | |
(:use :cl :alexandria) | |
(:export :lambda-generic)) | |
(in-package :anonymous-generic-function) | |
(defmacro defun-ct (name (&rest args) &body body) | |
`(eval-when (:load-toplevel :compile-toplevel :execute) | |
(defun ,name ,args | |
,@body))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro methodcall ((name &rest qualifiers-and-args) (&rest arg-values) &body next-function-body) | |
(let* ((qualifiers (butlast qualifiers-and-args)) | |
(specialized-args (mapcar (lambda (arg) (typecase arg (list arg) (t (list arg t)))) | |
(car (last qualifiers-and-args)))) | |
(args (mapcar #'car specialized-args)) | |
(specializers (mapcar #'cadr specialized-args))) | |
(alexandria:with-gensyms (method-obj method-fun next-args next-funs) | |
`(let* ((,method-obj (find-method #',name ',qualifiers ',specializers)) | |
(,method-fun (closer-mop:method-function ,method-obj))) | |
(funcall ,method-fun (list ,@arg-values) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var http = require('http'); | |
var url = require('url'); | |
function OK(contentType, body, otherHeaders = {}) { | |
return [ | |
200, | |
Object.assign({}, | |
otherHeaders, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ql:quickload :ningle) | |
(ql:quickload :clack) | |
(defvar *app* (make-instance 'ningle:<app>)) | |
(setf (ningle:route *app* "/some.json" :method :GET) | |
(lambda (p) | |
(declare (ignore p)) | |
'(200 | |
(:Content-Type "application/json") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(xhtmlambda::def-element <::request) | |
(defun post-to-endpoint (xml) | |
(let ((drakma:*text-content-types* (acons "application" "xml" drakma:*text-content-types*))) | |
(drakma:http-request *endpoint* | |
:basic-authorization (list *api-key* "X") | |
:method :post | |
:content (with-output-to-string (s) | |
(format s "~w" xml))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/zsh | |
git add $argv || exit 1 | |
git commit || exit 2 | |
git push || exit 3 | |
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INANGULIS> (defun a c (a c) a c) | |
INANGULIS> (a c 2) | |
2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "fiddlerwoaroof/markdown_case", | |
"require": { | |
"league/commonmark": "^0.13.0" | |
}, | |
"authors": [ | |
{ | |
"name": "fiddlerwoaroof", | |
"email": "fiddlerwoaroof@gmail.com" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/home/edwlan/.stack/programs/x86_64-linux/ghc-7.10.2/lib/ghc-7.10.2/package.conf.d: | |
Cabal-1.22.4.0 | |
array-0.5.1.0 | |
base-4.8.1.0 | |
bin-package-db-0.0.0.0 | |
binary-0.7.5.0 | |
rts-1.0 | |
bytestring-0.10.6.0 | |
containers-0.5.6.2 | |
deepseq-1.4.1.1 |