The Robin
λxyz.yzx
Clojure
(fn [x] (fn [y] (fn [z] ((y z) x)))
Because Clojure prefers variadic functions to curried functions, we need to make our own curried-map function
| function TabLine() | |
| let s = '' | |
| let t = tabpagenr() | |
| let i = 1 | |
| while l:i <= tabpagenr('$') | |
| let buflist = tabpagebuflist(l:i) | |
| let winnr = tabpagewinnr(l:i) | |
| let s .= '%' . l:i . 'T' | |
| let s .= (l:i == l:t) ? '%1*' : '%2*' | |
| let s .= '%*' |
| #!/usr/bin/env ruby | |
| def color_map | |
| yield ->(offset) { ->(color) { print "\x1b[48;5;#{color + offset}m " } } | |
| print "\x1b[0m", ?\n | |
| end | |
| puts 'System colors:' | |
| color_map { |color| 8.times &color[0] } |
| # Description | |
| # Example Plugin | |
| # | |
| # Commands | |
| # smith example | |
| # smith repeat <words> | |
| # smith roll die | |
| module.exports = (robot) -> |
The Robin
λxyz.yzx
Clojure
(fn [x] (fn [y] (fn [z] ((y z) x)))
Because Clojure prefers variadic functions to curried functions, we need to make our own curried-map function
| let g:ScreenImpl = 'Tmux' | |
| function! CustomScreenSend() | |
| silent! %s/\s\+$//e | |
| silent! g/^$/d | |
| ScreenSend | |
| silent! normal! ggdG | |
| endfunction |
| module Kernel | |
| def inherit_from(namespace, **methods) | |
| methods.each do |key, value| | |
| self.send :define_method, value, &namespace.instance_method(key).bind(self) | |
| end | |
| end | |
| end | |
| module Greetings |
| (defn build-tab | |
| [index item] | |
| [:li [:a {:href (str "#tab-link-" index) | |
| :data-toggle "tab"} (str (:name item))]]) | |
| (defn import-css | |
| [location] | |
| [:link {:type "text/css" :href location :rel "stylesheet"}]) | |
| (defn import-js |
| #!/usr/bin/env ruby | |
| module RTD | |
| module Model | |
| include Enumerable | |
| def all | |
| to_a |
| module Extendable | |
| def unique_instance_methods | |
| instance_methods.sort - superclass.instance_methods.sort | |
| end | |
| def extend_methods(*methods) | |
| methods.each do |method_extender| | |
| method = instance_method(method_extender) |
| @ECHO OFF | |
| SET SIZELIMIT=%2 | |
| SET FILESIZE=%~z1 | |
| SET FILEPATH=%~f1 | |
| SET DKEY="OS|Windows|FileSize|%~nx1" | |
| IF %FILESIZE% GTR %SIZELIMIT% ( | |
| ECHO %DKEY% %FILESIZE% 2 "%FILEPATH% is greater than %SIZELIMIT%" | |
| ) ELSE ( |