; -------------------- ; requires file: dicn ; -------------------- ( def _ops ( plus _ops ( makeff ( ( quote unix ) ( quote ( ( ( STR ) ) ( SEXP ) ) ) ) ) ) ) ;--------------------- ( def unix lambda ( n ) ( let ( ( f ( popen n "r" ) ) ( r ( readf f ) ) ( x ( pclose f ) ) ) r ) ) ;--------------------- ( def _ops ( plus _ops ( makeff ( ( quote p2i ) ( quote ( ( ( SYM ) ) ( SYM ) ) ) ) ) ) ) ;--------------------- ( def p2i lambda ( n ) ( let ( ( com ( strcat "awk '$1==\"" ( symstr n ) "\" {print $2}' dicn" ) ) ) ( unix com ) ) ) ;--------------------- ( def _ops ( plus _ops ( makeff ( ( quote trad ) ( quote ( ( ( LIST SYM ) ) ( LIST SYM ) ) ) ) ) ) ) ;--------------------- ( def trad lambda ( x ) ( seq ( p2i y ) ( from y x ) ) ) ;--------------------- ;---------------- test ( def x ( trad ( makeseq 'eu 'sou 'um 'simpatico 'rapaz ) ) ) ;--------------------- ( pp ( cond ( ( equal x ( makeseq 'I 'am 'a 'nice 'boy ) ) 'ok ) ( true 'error ) ) ) ;---------------------