File tree Expand file tree Collapse file tree 2 files changed +5
-21
lines changed
exercises/practice/lens-person Expand file tree Collapse file tree 2 files changed +5
-21
lines changed Original file line number Diff line number Diff line change 33 " sarava338" ,
44 " Cool-Katt"
55 ],
6+ "contributors" : [
7+ " themetar"
8+ ],
69 "files" : {
710 "solution" : [
811 " lens-person.js"
Original file line number Diff line number Diff line change 11export class Lens {
22 /**
33 *
4- * @param {Function } getter
5- * @param {Function } setter
4+ * @param {Function } getter - Function to get the value using a lens
5+ * @param {Function } setter - Function to set the value using a lens
66 */
77 constructor ( getter , setter ) {
88 this . get = getter ;
99 this . set = setter ;
1010 }
11-
12- /**
13- * Function to get the value from a lens
14- * @param {Person } person
15- * @returns {Person }
16- */
17- get ( person ) {
18- return this . get ( person ) ;
19- }
20-
21- /**
22- * Function to set the value using a lens
23- * @param {Person } person
24- * @param {any } value
25- * @returns {Person }
26- */
27- set ( person , value ) {
28- return this . set ( value , person ) ;
29- }
3011}
You can’t perform that action at this time.
0 commit comments