简体   繁体   中英

how do i create a tar archive with fake “the f# way”

i'm completely new to f# and fake, so excuse my horrible approach of creating a tar archive like

ArchiveHelper.Tar.CompressDir false (FileSystemHelper.directoryInfo "foo") (FileSystemHelper.fileInfo "bar.tar")

how would i write this in a more "functional" style? i tried using a pipe but failed in doing so because CompressDir expects 3 parameters and i couldn't figure out how to use 2 named parameters and get the missing third from the other function.

thanks!

Unless you are using CompressDir multiple times in a function I would leave it the way you have it.

If you do want to use pipelining then take a look at ||> and |||> in Symbol and Operator Reference (F#) .

I don't use FAKE so I can't comment on that part.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM