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
require 'formula' | |
# Documentation: https://github.com/mxcl/homebrew/wiki/Formula-Cookbook | |
# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST! | |
class Xmms2 < Formula | |
homepage 'http://xmms2.org/wiki/Main_Page' | |
url 'http://git.xmms2.org/xmms2/xmms2-devel/snapshot/6e6a9635f04c3e2c7af8dd9336ca6006d89f8114.tar.gz' | |
sha1 'b8ade9e2c511280fe98ed81df438e357b22f8157' | |
version '0.8.1' |
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
(require-extension srfi-4 glm) | |
(require-extension list-utils) | |
(require-extension statistics) | |
(define (mapi p l) | |
(let loop ((l l) (i 0) (r '())) | |
(if (pair? l) | |
(loop (cdr l) (+ i 1) (cons (p (car l) i) r)) | |
(reverse r)))) |
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
def split_num(arr) | |
arr.split("").map {|c| | |
c.to_i | |
} | |
.inject([]){|accumulator, value| | |
# puts "[#{accumulator}, #{value}]" | |
if accumulator.size > 0 and accumulator[-1][0] == value | |
accumulator[-1][1] += 1 | |
else |