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
reference: Functional Reactive Animation - by Conal Elliott et al | |
* 2 things: | |
- Behavior a | |
- Event a | |
* semantic functions | |
- at :: Behavior a -> Time -> a | |
- occ :: Event a -> (Time, a) |
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
window.Parser = { | |
/* need to add mutual-recursive parser combinator | |
components: | |
reg | |
eof | |
ret | |
opt | |
seq | |
tryp |
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
/* | |
for each type: | |
1. Define in Type as "newtype_t". | |
2. Define constructors. | |
If struct is needed, name it "Newtype_t". | |
3. Define "_deNewtype", which typed as "Data -> void". | |
*/ | |
#include<assert.h> |
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
expand(vec,dims) | |
# split vec into layers | |
ex:expand([1;2],[]) -> [1;2] | |
expand([1;2],[2]) -> [1 2; | |
1 2] | |
expand([1;2],[2 3]) -> | |
1 1 1 2 2 2 | |
1 1 1 2 2 2 (a 2*3*2 matrix) | |
expand([1;2;3],[1 2]) -> | |
1 1 2 2 3 3 (a 1*2*3 matrix) |
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
C-v ->vim:c-d | |
m-v ->vim:c-u | |
c-l ->vim:z. | |
c-u 0 c-l | |
m-f ->vim:w | |
c-a ->vim:0 | |
c-e ->vim:$ | |
m-a ->vim:{ | |
m-e ->vim:} | |
m-< ->vim:gg |
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 Console_module ( | |
input reset, | |
output [7:0] LCD_DATA, | |
output LCD_ENABLE, | |
output LCD_RW, | |
output LCD_RSTN, | |
output LCD_CS1, | |
output LCD_CS2, | |
output LCD_DI, | |
input lcd_clock, |
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
(setf smdl | |
(quote | |
;-----------write SMDL here and command (compile-it "filename")---------------------------- | |
;this is and example | |
(state-machine | |
(clock "clk") | |
(init-state A) | |
(triggerd | |
("tri" | |
"n_sig1" "n_sig2")) |
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
>(defmacro add-to-list (a lst) | |
`(setf ,lst (cons ,a ,lst))) | |
>(setf lst '(1 2)) ; lst是一個變數,值為(1 2)這個list | |
>(setf a 'lst) ; a是一個變數,值為#:LST這個symbol | |
>(cons 3 lst) ;lst先被evaluate | |
(3 1 2) | |
>lst | |
(1 2) ;lst的值不會變 |
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
aaaaa | |
bbb |
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
;longer,filter,group (p47 | |
;flatten,prune (p49 | |
;find2,before,after,duplicate,split-if (p50 | |
;most,best,mostn (p52 | |
;map0-n,map1-n,mapa-b,map->,mappend,mapcars,rmapcar (p54 | |
;readlist,prompt,break-loop (p56 | |
;mkstr,symb,reread,explode (p58 | |
;memoize (p65 | |
;rfind-if (p73 |
NewerOlder