I ran your code and got
> result <- mapply(myfunction,x=mylist1,y=mylist2)
> result
part1 part2
y$a 1 0
meana 3 0
meanb 100 50
you have a typo
result <- mapply(myfunction,x=mylist,y=mylist2)
which I changed to
result <- mapply(myfunction,x=mylist1,y=mylist2)
maybe this is the issue