--evalまたは-eオプションで引数の式を評価できます。
式はシングルクォート(`)で囲みます。
$ egison -e '(take 10 primes)'
{2 3 5 7 11 13 17 19 23 29}
% egison -T -e '(maclaurin-expansion (cos x) x)'
1
0
(/ (* -1 x^2) 2)
0
(/ x^4 24)
0
(/ (* -1 x^6) 720)
0
| function addb | |
| while read -l line | |
| echo $line | |
| end | |
| if count $argv >/dev/null | |
| echo $argv[1] | |
| end | |
| end |
| package main | |
| import ( | |
| "bytes" | |
| "errors" | |
| "fmt" | |
| "html/template" | |
| "log" | |
| "net" | |
| "net/mail" |
| #!/usr/bin/env zsh | |
| FO=$(cat) | |
| X=$(head -n 1 <<<$FO) | |
| YL=$(echo $FO|wc -l|bc) | |
| FF=$((echo $X|tr 1 0;echo $FO;echo $X|tr 1 0)|addl 0\ |addr \ 0) | |
| for L in {1..$YL};do | |
| for C in {1..$(echo $X|awk '{print NF}')}; do | |
| echo $FF | sed -n $L,$((L+2))p | cut -d \ -f $C,$((C+1)),$((C+2)) | xargs | { | |
| read B | |
| if echo $B | grep -q '. . . . 1 . . . .';then |
| (defun send-region-to-clipboard (START END) | |
| ;; Place https://github.com/skaji/remote-pbcopy-iterm2/blob/master/pbcopy as `cpbcopy` | |
| (interactive "r") | |
| (let ((infile (make-temp-file "send-region-to-clipboard"))) | |
| (write-region (buffer-substring (region-beginning) (region-end)) | |
| nil | |
| infile | |
| nil | |
| 'nomsg) | |
| (with-temp-buffer |
| ## 三角形 | |
| ## http://rubyfiddle.com/riddles/6bad3 | |
| a = [2, 3, 4, 5, 10] | |
| ans = 0 | |
| a.combination(3){|v,j,k| | |
| if k < (v+j) | |
| if ans < (v+j+k) |
import os
import sys| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <time.h> | |
| #include "sudoku_solver.h" | |
| int fill(sudokuGrid grid, int row, int column, int entry) | |
| { | |
| for (int i = 0; i < DIMENSIONS; i++) { |