Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
teaching:cc4101:tareas:2020-1:tarea2 [2020/06/06 17:21] bsubercaseauxteaching:cc4101:tareas:2020-1:tarea2 [2020/06/07 20:51] – [Warm-up (0.5 ptos)] bsubercaseaux
Line 71: Line 71:
 ===== Warm-up (0.5 ptos) ===== ===== Warm-up (0.5 ptos) =====
  
-- (0.4 ptos) Si ejecutan el último ejemplo, verán que el output no es <code scheme>"{Succ {Zero}}"</code> sino ''(structV 'Nat 'Succ (list (structV 'Nat 'Zero empty)))''. Defina la función ''pretty-printing''  que toma una estructura y entrega un string más amigable al usuario (similar a como se indica anteriormente).+- (0.4 ptos) Si ejecutan el penúltimo ejemplo, verán que el output no es <code scheme>"{Succ {Zero}}"</code> sino ''(structV 'Nat 'Succ (list (structV 'Nat 'Zero empty)))''. Defina la función ''pretty-printing''  que toma una estructura y entrega un string más amigable al usuario (similar a como se indica anteriormente).
 <code scheme> <code scheme>
 > (pretty-printing (structV 'Nat 'Succ (list (structV 'Nat 'Zero empty)))) > (pretty-printing (structV 'Nat 'Succ (list (structV 'Nat 'Zero empty))))