Convert function form python to haskell - open to bidding
$10-30 USD
Closed
Posted about 7 years ago
$10-30 USD
Paid on delivery
#! /usr/bin/python
import random
import sys
def recursive_solution(nums, masGrande):
if len(nums) == 0:
return nums
result = recursive_solution(nums[1:], masGrande)
if (nums[0] > masGrande) or (masGrande == -1):
sequence_with = [nums[0]] + recursive_solution(nums[1:], nums[0])
if len(sequence_with) >= len(result):
result = sequence_with
return result
def printResult(lst) :
cargo_types = ['frumento', 'armis', 'aere', 'pannum', 'sparto', 'garum']
for i in lst :
print str([login to view URL]( cargo_types, 1 )[0]) + " " + str(i)
if (len([login to view URL]) >= 2) :
fichero = open([login to view URL][1],'r')
else :
fichero = open("[login to view URL]",'r')
lista = []
for line in fichero :
line = [login to view URL]()
[login to view URL](int(line[1]))
import random
import sys
solucio = recursive_solution(lista,-1)
printResult(solucio)
Hi
I am interested in this I can work with both python and haskell. Could you upload a .txt with the python code because the indentation is destroyed in the post
hello,
place your confidence in my Python/Haskell knowledge and experience.
let's check if there're any additional requirements and discuss a solution.
greets, srdjan