functional programming - Inverting order of multiple values in Common Lisp -


i've been thinking following problem. suppose i'm dealing function returning multiple values, such truncate. there clever way reverse order of values returned? i'm talking more clever e.g.

(multiple-value-bind (div rem) (truncate x y)   (values rem div)) 

i don't know how clever is, here's want:

(reverse (multiple-value-list (the-function-that-returns-multiple-values))) 

multiple-value-list being key, here.

to return these again separate values, use values-list:

(values-list (reverse (multiple-value-list (the-function-that-returns-multiple-values)))) 

this whole page may enlightening.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -