]> gitweb.factorcode.org Git - factor.git/blob - basis/checksums/bsd/bsd.factor
basis: removing unnecessary method stack effects.
[factor.git] / basis / checksums / bsd / bsd.factor
1 ! Copyright (C) 2013 John Benediktsson.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: checksums kernel math sequences ;
4 IN: checksums.bsd
5
6 SINGLETON: bsd
7
8 M: bsd checksum-bytes
9     drop 0 [
10         [ [ -1 shift ] [ 1 bitand 15 shift ] bi + ] dip
11         + 0xffff bitand
12     ] reduce ;
13
14 INSTANCE: bsd checksum