Home

Awesome

vhs

Haskell list functions implemented in v lang

VHS is an implementation of some useful functions in V that exist in the Haskell programming language Prelude

Importing the module

  v install vhs KevinDaSilvaS.vhs

In your v file import

 import kevindasilvas.vhs as vhsmod

To use a function just type:

 println(vhsmod.take(2, [1,2,3])) // [1,2]

Reverse a list

   println(vhsmod.reverse_list([1,2,3])) // [3,2,1]
   println(vhsmod.reverse_list([])) // []

Zips

List methods