[Cs254f11] Confusion over maps

Wm. Josiah Erikson wjerikson at hampshire.edu
Tue Nov 15 21:08:55 EST 2011


I don't understand why my "get" and "find" statements aren't working 
here. Probably really basic (I don't HAVE to have the useful ":" macro 
in front of the keys to use a map, do I?)

test
{average_velocity 37,
  number_of_different_real_notes 57,
  most_common_real_note 64,
  average_real_note 60,
  average_note 57,
  low_note 28,
  high_note 91,
  std_dev_mostcom 11}

critic_evolution.core=>
(get test low_note)
nil

critic_evolution.core=>
(keys test)
(average_velocity
  number_of_different_real_notes
  most_common_real_note
  average_real_note
  average_note
  low_note
  high_note
  std_dev_mostcom)

critic_evolution.core=>
(find test low_note)
nil

critic_evolution.core=>
test
{average_velocity 37,
  number_of_different_real_notes 57,
  most_common_real_note 64,
  average_real_note 60,
  average_note 57,
  low_note 28,
  high_note 91,
  std_dev_mostcom 11}

critic_evolution.core=>
(vals test)
(37 57 64 60 57 28 91 11)

critic_evolution.core=>
(map? test)
true

critic_evolution.core=>


More information about the Cs254f11 mailing list