2 USING: kernel words namespaces arrays sequences prettyprint
3 help.topics help.markup bake combinators.cleave
4 obj obj.misc obj.print ;
8 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10 : $tab ( seq -- ) first print-table ;
11 : $obj ( seq -- ) first print-table ;
12 : $seq ( seq -- ) first print-seq ;
13 : $ptr ( seq -- ) first get print-table ;
15 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
17 PREDICATE: obj-type < symbol types member? ;
19 M: obj-type article-title ( type -- title ) unparse ;
21 M: obj-type article-content ( type -- content )
22 objects [ type -> = ] with filter
25 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
27 M: ptr article-title ( ptr -- title ) [ title -> ] [ unparse ] bi or ;
29 M: ptr article-content ( ptr -- content )
31 [ get { $obj , } bake ]
32 [ drop { $heading "Related\n" } ]
33 [ related { $seq , } bake ]
37 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
39 PREDICATE: obj-list < word \ objects = ;
41 M: obj-list article-title ( objects -- title ) drop "Objects" ;
43 ! M: obj-list article-content ( objects -- title )
45 ! [ [ type -> ] [ ] bi 2array ] map
48 M: obj-list article-content ( objects -- title )
51 [ [ type -> ] [ ] bi 2array ] map