# coding=utf-8 id = 146 name = 'genexp/2' slug = 'generate an arithmetic expression from a list' description = '''\

genexp(L, E): the expression E is obtained from the list L by inserting arithmetic operators between list elements. Your code should generate all valid solutions.

  ?- genexp([1,2,3], L).
    L = 1+2+3 ;
    L = 1+2-3 ;
    L = (1+2)*3 ;
    L = (1+2)/3 ;
    L = 1-2+3 ;
    L = 1-2-3 ;
    ...
''' hint = {}