title: Using maplist with a lambda that does not have a body?
body: <p>Having a list <code>List</code> filled with numbers, I want to obtain a list of pairs <code>Pairs</code>, where each pair in <code>Pairs</code> is in the form <code>&lt;number&gt;-0</code>, i.e., each number of <code>List</code> should be followed by <code>-0</code>.</p>
  <p>I came up with following solution to this, using <code>maplist</code> and a lambda:</p>
  <pre><code>List = [1,2,30], maplist([X,X-0]&gt;&gt;(!), List, Pairs).
  </code></pre>
  <p>Result: <code>Pairs = [1-0, 2-0, 30-0].</code></p>
  <p>While this works, the lambda <code>[X,X-0]&gt;&gt;(!)</code> just looks odd to me.
  I know that I could also write <code>[X,Y]&gt;&gt;(Y=X-0)</code> to have something &quot;useful&quot; in the body, but I was wondering if I could write the first version without the &quot;empty lambda body&quot;? Or is there a way to avoid the lambda at all, without introducing a new predicate (I would like to keep the solution to one line)? Thanks!</p>