Small puzzler

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Small puzzler

Nikolay Aleksandrovich Pavlov
Hello, I have a small puzzler for you: describe all messages which the
below code may possibly yield depending on what you substitute for `^`
and `^^`, assuming that first may only be either zero or one and
second may only be a dictionary {}, dictionary {'a': 1} or number 2.

(Preferably do this without actually running, there are only six
combinations under given conditions after all.)

    :function Foo(...)
    :  let cond = ^
    :  let dict = ^^
    :  echo cond?dict.a:0|echo 3
    :endfunction
    :call Foo()

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.