>>767
1. listAをlistA1 ++ [x] ++ listA2にわける
2. listA1とlistBのintersectionを取って判定

f listA listB x =
if y == 0 then 1 else if y == length listB then -1 else 0
 where y = length $ takeWhile (/= x) listA `intersect` listB