Association in Common Lisp -


निम्न प्रारूप की एक संरचना है:

  (setq dist '((1 1) 1) ((2 2) 3) ((1 2) 1) ((2 3) 3) ((3 5) 4)))  

क्या कोई फ़ंक्शन है , अगर मैं

  (myf '(0 2)) को कॉल करता हूं, तो मुझे  
  3   

या

  ((2 2) 3)  

कुछ रिवर्स assoc / P>

मुझे यह देखने में असफल हो रहा है कि इसे एक रिवर्स एएसएसओसी कहलाएगा क्यों।

  (एशॉक '(0 2) जिला: परीक्षण #' बराबर) & gt; ऐसा लगता है कि एएसएसओसी ठीक काम करती है, बशर्ते आप  परीक्षण  फ़ंक्शन को बदलते हैं, ताकि चाबियाँ के रूप में इस्तेमाल की गई सूचियां सही ढंग से जांच ली गई हों।  
/ P>

Comments

Popular posts from this blog

iphone - How do I make a UIPickerView in a UIActionSheet -

java - Is there an object like a "Set" that can contain only unique string values, but also contain a count on the number of occurrences of the string value? -