USING: arrays bunny.model bunny.cel-shaded
-combinators.lib continuations kernel math multiline
+combinators.cleave continuations kernel math multiline
opengl opengl.shaders opengl.framebuffers opengl.gl
- opengl.capabilities sequences ui.gadgets ;
+ opengl.capabilities sequences ui.gadgets combinators.cleave ;
IN: bunny.outlined
STRING: outlined-pass1-fragment-shader-main-source
! map-call and friends
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ : (make-call-with) ( quots -- quot )
+ [ [ keep ] curry ] map concat [ drop ] append ;
+
MACRO: map-call-with ( quots -- )
- [ [ [ keep ] curry ] map concat [ drop ] append ] keep length [ narray ] curry compose ;
+ [ (make-call-with) ] keep length [ narray ] curry compose ;
+
+ : (make-call-with2) ( quots -- quot )
+ [ [ 2dup >r >r ] swap append [ r> r> ] append ] map concat
+ [ 2drop ] append ;
MACRO: map-call-with2 ( quots -- )
- [ (make-call-with2) ] keep length [ narray ] curry append ;
+ [
+ [ [ 2dup >r >r ] swap append [ r> r> ] append ] map concat
+ [ 2drop ] append
+ ] keep length [ narray ] curry append ;
MACRO: map-exec-with ( words -- )
[ 1quotation ] map [ map-call-with ] curry ;