Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /d1 2 dict def
- d1 begin
- 3 (Some Int) def
- 3.0 (Some Real) def
- end
- /d2 2 dict def
- d2 begin
- 3.0 (Some Real) def
- 3 (Some Int) def
- end
- /p1 { dup type == ( -> ) print == } def
- (*** d1 ***\n) print
- d1 { exch p1 p1 } forall
- (*** d2 ***\n) print
- d2 { exch p1 p1 } forall
- ============ OUTPUT ============
- *** d1 ***
- integertype
- -> 3
- stringtype
- -> (Some Real)
- *** d2 ***
- realtype
- -> 3.0
- stringtype
- -> (Some Int)
Add Comment
Please, Sign In to add comment