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
package com.alibaba.dubbo.demo; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import com.alibaba.dubbo.common.utils.Assert; | |
import com.alibaba.dubbo.config.ApplicationConfig; |
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
(ns joy.q) | |
;; nil | |
(defn nom [n] (take n (repeatedly #(rand-int n)))) | |
;; #'joy.q/nom | |
(defn sort-parts [work] | |
(lazy-seq | |
(loop [[part & parts] work] ;; Pull apart work - note: work will be a list of lists. | |
(if-let [[pivot & xs] (seq part)] ;; This blows up unless work was a list of lists. |
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
;;; See the inspirational SO question: http://stackoverflow.com/questions/3346382 | |
(require 'clojure.contrib.trace) | |
(defn trace-ns | |
"Replaces each function from the given namespace with a version wrapped | |
in a tracing call. Can be undone with untrace-ns. ns should be a namespace | |
object or a symbol." | |
[ns] | |
(doseq [s (keys (ns-interns ns)) |