This file contains hidden or 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
| module PeanoSum where | |
| -- Written by Marcelo Camargo <[email protected]> on | |
| -- Sat Oct 22 2016 | |
| -- Represent natural numbers | |
| data Nat = Zero | |
| | Succ Nat | |
| -- Let neutral element of Monoid be id | |
| -- Let (Functor a) b become Functor (a .+. b) |
This file contains hidden or 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
| set nocompatible | |
| filetype off | |
| " set the runtime path to include Vundle and initialize | |
| set rtp+=~/.vim/bundle/Vundle.vim | |
| set rtp+=/usr/local/lib/python2.7/dist-packages/powerline/bindings/vim/ | |
| " Always show statusline | |
| set laststatus=2 |
This file contains hidden or 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
| set nocompatible | |
| filetype off | |
| " set the runtime path to include Vundle and initialize | |
| set rtp+=~/.vim/bundle/Vundle.vim | |
| set rtp+=/usr/local/lib/python2.7/dist-packages/powerline/bindings/vim/ | |
| " Always show statusline | |
| set laststatus=2 |
This file contains hidden or 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
| set nocompatible | |
| filetype off | |
| " set the runtime path to include Vundle and initialize | |
| set rtp+=~/.vim/bundle/Vundle.vim | |
| set rtp+=/usr/local/lib/python2.7/dist-packages/powerline/bindings/vim/ | |
| " Always show statusline | |
| set laststatus=2 |
This file contains hidden or 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
| // Não otimizado, acumulo na stack | |
| var map = (f, xss) => 0 === xss.length | |
| ? [] | |
| : [f(xss[0])].concat(map(f, xss.slice(1))); | |
| // Exemplo | |
| map(x => x * 2, [1, 2, 3]) | |
| // Itens na stack: | |
| // map(function, [1, 2, 3]) |
This file contains hidden or 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
| set nocompatible | |
| filetype off | |
| " set the runtime path to include Vundle and initialize | |
| set rtp+=~/.vim/bundle/Vundle.vim | |
| set rtp+=/usr/local/lib/python2.7/dist-packages/powerline/bindings/vim/ | |
| " Always show statusline | |
| set laststatus=2 |
This file contains hidden or 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
| var shitPosting; | |
| function clearShitFromAPDA() { | |
| Array.prototype.slice.call(document.getElementsByClassName('userContent'), 0) | |
| .filter(x => x.innerText.match(/^\[off\]/i)) | |
| .map(x => x.parentNode.parentNode) | |
| .forEach(x => x.parentNode.removeChild(x)); | |
| shitPosting = setTimeout(clearShitFromAPDA, 1000); | |
| } |
This file contains hidden or 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
| set nocompatible | |
| filetype off | |
| " set the runtime path to include Vundle and initialize | |
| set rtp+=~/.vim/bundle/Vundle.vim | |
| set rtp+=/usr/local/lib/python2.7/dist-packages/powerline/bindings/vim/ | |
| " Always show statusline | |
| set laststatus=2 |
This file contains hidden or 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
| {- | |
| Zachary Weaver <[email protected]> | |
| JSONParser.hs | |
| Version 0.1.1 | |
| A simple example of parsing JSON with Parsec in haskell. Note that | |
| since the primary point of this excersize is demonstration, | |
| Text.Parsec.Token was avoided to expose more of the grammar. Also, | |
| complicated optimizations and shorcuts were avoided (mostly). |
This file contains hidden or 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 [os [listdir remove]]) | |
| (import [os.path [isfile join]]) | |
| (import [sys [argv]]) | |
| ; Path for tests | |
| (setv test-dir "./tests") | |
| ; Extension for the tests | |
| (setv test-ext ".qtest") | |
| ; List all the files in the test suit |