]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/rosetta-code/bitmap/bitmap.factor
core, basis, extra: Remove DOS line endings from files.
[factor.git] / extra / rosetta-code / bitmap / bitmap.factor
index 3cac8cba12e1e827ac6842b15824ebf08cbe087d..e45fbb9a7430db7030ee6455aee2a92cb97c8590 100644 (file)
@@ -21,12 +21,12 @@ IN: rosetta-code.bitmap
 
 ! Various utilities
 : meach ( matrix quot -- ) [ each ] curry each ; inline
-: meach-index ( matrix quot -- ) 
+: meach-index ( matrix quot -- )
     [ swap 2array ] prepose
     [ curry each-index ] curry each-index ; inline
 : mmap ( matrix quot -- matrix' ) [ map ] curry map ; inline
 : mmap! ( matrix quot -- matrix' ) [ map! ] curry map! ; inline
-: mmap-index ( matrix quot -- matrix' ) 
+: mmap-index ( matrix quot -- matrix' )
     [ swap 2array ] prepose
     [ curry map-index ] curry map-index ; inline
 
@@ -35,9 +35,9 @@ IN: rosetta-code.bitmap
 : Mi,j ( {i,j} matrix -- elt ) [ first2 swap ] dip nth nth ;
 
 ! The storage functions
-: <raster-image> ( width height -- image ) 
+: <raster-image> ( width height -- image )
     zero-matrix [ drop { 0 0 0 } ] mmap ;
-: fill-image ( {R,G,B} image -- image ) 
+: fill-image ( {R,G,B} image -- image )
     swap '[ drop _ ] mmap! ;
 : set-pixel ( {R,G,B} {i,j} image -- ) set-Mi,j ; inline
 : get-pixel ( {i,j} image -- pixel ) Mi,j ; inline