title: Converting a list containing a binary number to decimal and hexadecimal in scheme
body: <p>I'm pretty new to scheme. I know how to convert from decimal to binary but I can't come with the logic of converting the other way around. I want to get a decimal number from a list of binary numbers.</p>
  
  <p>Example of decimal:</p>
  
  <pre><code>(decimal '(1 0 1)) ---&gt; 5
  </code></pre>
  
  <p>Example of hexadecimal:</p>
  
  <pre><code>(hexadecimal '(1 0 0 0 1)) ----&gt; 12
  </code></pre>
  
  <p>So far I think it can be done taking the last number of the list and multiply it recursively by 2<sup>i</sup> where i represents the position in the list so the last number is multiplied by 1, the next one by two, and so on. Finally add these numbers on each recursive cycle. Dont know how to execute this idea nor if it will work.</p>