add - ocaml sum of two lists with different length -


I tried to add two lists with different lengths:

  sumList (a , B) = Match A, with B [], _ - & gt; [] | (X :: Xs, Y :: YS) - & gt; (X + Y) :: Defile List (Xs, YS)   

This unbound value returns the ratios, is it possible that Haskell: zipWith (+) a Perhaps the actual error is "unbound value defaulter" because you have diffList in your code.

.

If this is a transcription error, then the next problem is that you sum list as a recursive function: REC list (A, B) = .. . .

The match of your pattern is not complete if the first list is long, then it fails.

Haskell is friendly with zipWith Okamax List.map2 , for which lists are required length. I do not think anything is acceptable in the Okamam standard library.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -