What is the translation of " FMAP " in English?

Examples of using Fmap in Vietnamese and their translations into English

{-}
  • Colloquial category close
  • Ecclesiastic category close
  • Computer category close
Và sau đây là kiểu của fmap.
And this is the type of fmap.
Thực ra, fmap chỉ có thể được xác định theo bind và return.
Actually, fmap can be defined only in terms of bind and return.
Đây là định nghĩa chung của fmap.
Here's the general definition of fmap.
Nếu viết fmap f( fmap g Nothing), ta sẽ thu được Nothing, với cùng lý do.
If we do fmap f(fmap g Nothing), we get Nothing, for the same reason.
Như vậy nó khá giống với fmap!
So it's pretty much the same thing as fmap!
Kiểu fmap( replicate 3)::( Functor f)=gt; f a-gt; f[ a] có nghĩa là hàm này sẽ hoạt động với bất kì functor nào.
The type fmap(replicate 3)::(Functor f)=gt; f a-gt; f[a] means that the function will work on any functor.
Sau đây là cáchviết lại hàm này có dùng fmap.
Here's how to rewrite this by using fmap.
Điều này có thể khó hiểu,vì vậy đây là một hình ảnh về cách fmap hoạt động trở lại với plus3 trong hình này.
This can tricky to understand,so here's is a visual of how fmap works again with plus3 in this figure.
Biểu thức fmap(* 2) là một hàm nhận vào một functor f trên các số rồi trả về một functor cũng trên các số.
The expression fmap(*2) is a function that takes a functor f over numbers and returns a functor over numbers.
Như vậy từ hai phương trình trong phần thực hiện của fmap, ta đã thấy rằng định luật fmap id= id được thỏa mãn.
So from these two equations in the implementation for fmap, we see that the law fmap id= id holds.
Cũng như khi ta fmap reverse đối với Just" blah" để thu được Just" halb", ta có thể fmap reverse đối với getLine.
Just like when we fmap reverse over Just"blah" to get Just"halb", we can fmap reverse over getLine.
Sau khi định nghĩa nó, ta biến nó thành một thực thể của Functor và bằng việc này đã giành khả năng fmap hàm đối với cây.
After defining it, we made it an instance of Functor and with that we gained the ability to fmap functions over it.
Lưu ý rằng vì về cơ bản fmap trả về một bản sao mới của container tại mỗi lần gọi, nên nó có thể được coi là không thay đổi.
Notice that because fmap basically returns a new copy of the container at each invocation, it can be considered to be immutable.
Nếu ta xem functor như là thứ có thể được ánh xạ lên, thì định luật fmap id= id có vẻ quá tầm thường, hoặc dễ thấy.
If we view the functor as something that can be mapped over, the fmap id= id law seems kind of trivial or obvious.
Nếu ta muốn CMaybe tuân theo các định luật functor, thì ta phải làm sao chotrường Int vẫn giữ nguyên khi ta dùng fmap.
If we wanted CMaybe to obey the functor laws, we would have to make it so thatthe Int field stays the same when we use fmap.
Nếu ta dùng fmap( replicate 3) với một danh sách, thì dạng fmap thực hiện với danh sách sẽ được chọn lấy, vốn đơn giản chỉ là map.
If we use fmap(replicate 3) on a list, the list's implementation for fmap will be chosen, which is just map.
Việc này cũng đảm nhiệm luôn cảtrường hợp mà tham số thứ hai là Nothing, vì việc fmap với bất kì hàm nào lên Nothing sẽ trả lại Nothing.
This also takes care of thecase where the second parameter is Nothing, because doing fmap with any function over a Nothing will return a Nothing.
Khi ta dùng fmap(+ 3) lên Just 3, có thể dễ dàng tưởng tượng Maybe như là một cái hộp chứa thứ gì đó mà ta sẽ áp dụng hàm(+ 3).
When we use fmap(+3) over Just 3, it's easy to imagine the Maybe as a box that has some contents on which we apply the function(+3).
Nhưng dường như không có cách nào để làm điều tựa như vậy với( a, b) vì vậy tham số kiểu a rút cục sẽ làthứ thay đổi khi ta dùng fmap.
But it seems like there's no way to do something like that with(a, b) so that the type parameter a ends upbeing the one that changes when we use fmap.
Biểu thức fmap( replicate 3) sẽ nhận một functor với bất kì kiểu nào và trả lại một functor trên một danh sách các phần tử có cùng kiểu đó.
The expression fmap(replicate 3) will take a functor over any type and return a functor over a list of elements of that type.
Trong Haskell, chúng được mô tả bởi lớp Functor, vốn chỉ có duy nhất một phương thức tên là fmap, vốn có kiểu fmap::( a-gt; b)-gt; f a-gt; f b.
In Haskell, they're described by the typeclass Functor, which has only one typeclass method, namely fmap, which has a type of fmap::(a-gt; b)-gt; f a-gt; f b.
Mục đích của việc có fmap trả về cùng loại( hoặc bọc kết quả lại vào một thùng chứa) là để chúng ta có thể tiếp tục các hoạt động chuỗi.
The purpose of having fmap return the same type(or wrap the result again into a container) is so that we can continue chaining operations.
Nếu bạn đã từng ở vào tình trạng cần gắn kết quả của một thao tác I/ O vào một tên gọi, chỉ để áp dụng một hàm cho nó và gọi thứ mới tạo ra bằng một tên khác,thì bạn có thể dùng fmap, vì nó trông đẹp hơn.
If you ever find yourself binding the result of an I/O action to a name, only to apply a function to that and call that something else,consider using fmap, because it looks prettier.
Ta thấy rằng nếu fmap id lên Just x, kết quả sẽ là Just( id x), và vì id chỉ việc trả lại tham số của nó, nên ta có thể suy ra Just( id x) bằng Just x.
We see that if wee fmap id over Just x, the result will be Just(id x), and because id just returns its parameter, we can deduce that Just(id x) equals Just x.
Bạn hình dung ra cách mà định luật thứhai thỏa mãn với một kiểu dữ liệu nào đó bằng cách xem xét đoạn mã lệnh thực hiện của fmap đối với kiểu này rồi dùng phương pháp mà ta đã dùng để kiểm tra xem liệu Maybe có tuân theo định luật thứ nhất không.
You figure out how the secondlaw holds for some type by looking at the implementation of fmap for that type and then using the method that we used to check if Maybe obeys the first law.
Hàm fmap lấy một hàm( từ A-gt; B) và hàm Wrapper( ngữ cảnh được bao bọc)( A) và trả về một hàm functor Wrapper( B) mới chứa kết quả của việc áp dụng hàm đã nói lên giá trị và sau đó đóng lại một lần nữa.
The function fmap takes a function(from A-gt; B) and a functor(wrapped context) Wrapper(A) and returns a new functor Wrapper(B) containing the result of applying said function onto the value and then closes it once more.
Viết ví dụ cụ thể này là( a-gt; b)-gt;( Ta-gt; Tb) nói đúng là chỉ thêm các kýtự không cần thiết, nhưng về mặt đạo đức là" điều đúng để làm" vì nó nhấn mạnh rằng fmap ánh xạ một hàm kiểu a-gt; b đến một hàm của kiểu Ta-gt; Tb.
Writing this particular example as(a-gt; b)-gt;(Ta-gt; Tb) is strictly speaking just adding unncessary characters,but it's morally"the right thing to do" as it emphasises that fmap maps a function of type a-gt; b to a function of type Ta-gt; Tb.
Bạn có thể hình dung fmap như là một hàm nhận một hàm khác và một functor rồi ánh xạ hàm khác đó lên functor, hoặc cũng có thể hình dung nó như một hàm nhận một hàm khác rồi nâng hàm đó lên để nó hoạt động được với các functor.
You can think of fmap as either a function that takes a function and a functor and then maps that function over the functor, or you can think of it as a function that takes a function and lifts that function so that it operates on functors.
Vì vậy, ta không thể viết instance Functor Either where, nhưng lại có thể viết instance Functor( Either a) where và rồi nếu ta hình dung rằng fmap chỉ là dành cho Either a, thì nó sẽ phải có một lời khai báo kiểu là fmap::( b-gt; c)-gt; Either a b-gt; Either a c.
So we can't write instance Functor Either where, but we can write instance Functor(Either a) where and then if we imagine that fmap is only for Either a, it would have a type declaration of fmap::(b-gt; c)-gt; Either a b-gt; Either a c.
Khi ta xem Maybe như là một functor, ta thấy được rằng nếu muốn fmap một hàm lên nó, thì functor này sẽ bị ánh xạ tất cả các phần tử trong nó, nếu nó là một giá trị Just, còn nếu không thì Nothing được giữ lại vì khi đó không có gì để ánh xạ lên nữa!
When we looked at Maybe as a functor, we saw that if we want to fmap a function over it, it gets mapped over the insides if it's a Just value, otherwise the Nothing is kept because there's nothing to map it over!
Results: 70, Time: 0.0149

Top dictionary queries

Vietnamese - English