From adc4245d8b56de05e5bbf7b93935868319732bcd Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sun, 11 Jan 2009 15:37:05 -0600 Subject: [PATCH] Clean up benchmark.nbody using a smart combinator --- extra/benchmark/nbody/nbody.factor | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extra/benchmark/nbody/nbody.factor b/extra/benchmark/nbody/nbody.factor index 84c41ee69f..37c4fc43c5 100644 --- a/extra/benchmark/nbody/nbody.factor +++ b/extra/benchmark/nbody/nbody.factor @@ -1,7 +1,7 @@ -! Copyright (C) 2008 Slava Pestov. +! Copyright (C) 2008, 2009 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: accessors specialized-arrays.double fry kernel locals make math -math.constants math.functions math.vectors prettyprint +USING: accessors specialized-arrays.double fry kernel locals math +math.constants math.functions math.vectors prettyprint combinators.smart sequences hints arrays ; IN: benchmark.nbody @@ -53,7 +53,7 @@ TUPLE: nbody-system { bodies array read-only } ; offset-momentum drop ; inline : ( -- system ) - [ , , , , , ] { } make nbody-system boa + [ ] output>array nbody-system boa dup bodies>> init-bodies ; inline :: each-pair ( bodies pair-quot: ( other-body body -- ) each-quot: ( body -- ) -- )