1 USING: io lint kernel math sequences tools.test ;
4 ! Don't write code like this
5 : lint1 ( obj -- ) [ "hi" print ] [ ] if ; ! when
7 { { { lint1 { [ [ ] if ] } } } } [ \ lint1 lint-word ] unit-test
9 ! : lint2 ( a b -- b a b ) dup -rot ; ! tuck
11 ! [ { { lint2 { [ dup -rot ] } } } ] [ \ lint2 lint-word ] unit-test
13 : lint3 ( seq -- seq ) [ 0 swap nth 1 + ] map ;
15 { { { lint3 { [ 0 swap nth ] } } } } [ \ lint3 lint-word ] unit-test